diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2018-04-07 15:12:57 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2018-04-07 15:12:57 +0200 |
commit | 6e1ab9aa550695ee7e3d467b4173c0b83ba7f759 (patch) | |
tree | 8fb7faa4364a7cbf1cba48296a5f537e13f2a8d9 /Completion/Unix/Command/_entr | |
parent | 5ad56a41f1ee2e61abca079f5ea8909f895ac2dd (diff) | |
parent | f027f1d6e876708bc75d4217e1ca26898658d8d3 (diff) | |
download | zsh-6e1ab9aa550695ee7e3d467b4173c0b83ba7f759.tar.gz zsh-6e1ab9aa550695ee7e3d467b4173c0b83ba7f759.zip |
Merge tag 'zsh-5.4.2-test-2' / 'upstream' branch into 'debian' branch
Test version 2 prior to zsh 5.5.
Diffstat (limited to 'Completion/Unix/Command/_entr')
-rw-r--r-- | Completion/Unix/Command/_entr | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_entr b/Completion/Unix/Command/_entr index 8a830ae71..a8d43fc5e 100644 --- a/Completion/Unix/Command/_entr +++ b/Completion/Unix/Command/_entr @@ -1,9 +1,23 @@ #compdef entr +local curcontext="$curcontext" state state_descr line ret=1 +typeset -A opt_args + _arguments -s -S \ '-c[execute clear before invoking utility]' \ '-d[track directories and exit if a new file is added]' \ '-p[postpone first execution of the utility]' \ '-r[reload a persistent child process]' \ - '(-):command name:_command_names -e' \ - '*::arguments:_normal' + '(*)-s[evaluate the first argument using interpreter specified by $SHELL]' \ + '(-): :->command' \ + '*::arguments:_normal' && ret=0 + +if [[ -n $state ]]; then + if (( $+opt_args[-s] )); then + _cmdstring && ret=0 + else + _command_names -e && ret=0 + fi +fi + +return ret |