summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2017-08-29 00:38:32 +0200
committerOliver Kiddle <opk@zsh.org>2017-08-29 00:38:32 +0200
commite5c11eb7b55d96b740db1684b8ff89d412f4df15 (patch)
treee42905bb42c97c51e09637c07f141e34fa797875
parent92ec72844c9b3db9cadb5572d244b16c966b719c (diff)
downloadzsh-e5c11eb7b55d96b740db1684b8ff89d412f4df15.tar.gz
zsh-e5c11eb7b55d96b740db1684b8ff89d412f4df15.zip
41616: update completion options to entr 3.8
-rw-r--r--ChangeLog2
-rw-r--r--Completion/Unix/Command/_entr18
2 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 268bf5d67..1c77435d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2017-08-29 Oliver Kiddle <opk@zsh.org>
+ * 41616: Completion/Unix/Command/_entr: update options to 3.8
+
* unposted: Completion/Unix/Type/_bpf_filters:
add missing #autoload directive
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