summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorFrank Terbeck <bewater@users.sourceforge.net>2011-06-01 21:30:11 +0000
committerFrank Terbeck <bewater@users.sourceforge.net>2011-06-01 21:30:11 +0000
commit8101886e488111cf26d94468854efd5b3daf0856 (patch)
tree05cb55092f433b2c3ac4ab28fc9a17c313800cc6 /Completion
parent0deff4f99aaf2e6389ab441eec04c68a9a27681d (diff)
downloadzsh-8101886e488111cf26d94468854efd5b3daf0856.tar.gz
zsh-8101886e488111cf26d94468854efd5b3daf0856.tar.xz
zsh-8101886e488111cf26d94468854efd5b3daf0856.zip
29412: _tmux: Disable sub-command completions if tmux is not found in `$path'.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_tmux4
1 files changed, 4 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux
index e9977fbbd..5fb721960 100644
--- a/Completion/Unix/Command/_tmux
+++ b/Completion/Unix/Command/_tmux
@@ -1520,6 +1520,10 @@ function _tmux() {
                 _describe -t subcommands 'tmux commands and aliases' _tmux_commands -- _tmux_aliases
             fi
         else
+            if (( ${+commands[tmux]} == 0 )); then
+                _message '`tmux'\'' not found in $path; sub-cmd completions disabled.'
+                return 0
+            fi
             tmuxcommand="${words[1]}"
             if [[ -n ${_tmux_aliasmap[$tmuxcommand]} ]] ; then
                 tmuxcommand="${_tmux_aliasmap[$tmuxcommand]}"