aboutsummaryrefslogtreecommitdiff
path: root/files/.zsh/rc/S40_completion
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2023-05-11 13:26:56 +0500
committerAnton Bobov <anton@bobov.name>2023-05-11 13:26:56 +0500
commit8cf98606d56391e7eb25a247f04f9a8e8b2562ca (patch)
treea43a26dfc40e40c8c3a3db795000c8515948b7f7 /files/.zsh/rc/S40_completion
parent5bf7733be5b40e653e3843e8fd74fcbf719a6d1b (diff)
Updates
Diffstat (limited to 'files/.zsh/rc/S40_completion')
-rw-r--r--files/.zsh/rc/S40_completion10
1 files changed, 8 insertions, 2 deletions
diff --git a/files/.zsh/rc/S40_completion b/files/.zsh/rc/S40_completion
index 7ba2f08..6b953c7 100644
--- a/files/.zsh/rc/S40_completion
+++ b/files/.zsh/rc/S40_completion
@@ -45,7 +45,13 @@ compdef ledger=hledger
compdef _gnu_generic lshw df duplicity tldr
compdef _gnu_generic -p 'pg_*'
-# youtube-dl
-[[ -f /etc/bash_completion.d/youtube-dl.bash-completion ]] && source /etc/bash_completion.d/youtube-dl.bash-completion
+__load_completion_if_exists() {
+ [[ -f "$1" ]] && source "$1"
+}
+
+__load_completion_if_exists /etc/bash_completion.d/youtube-dl.bash-completion
+__load_completion_if_exists /usr/share/zsh/vendor-completions/_git-extras
+
+unset -f __load_completion_if_exists
# vim: et ft=zsh fdm=marker :