summary refs log tree commit diff
diff options
context:
space:
mode:
authordana <dana@dana.is>2019-01-01 08:01:14 -0600
committerdana <dana@dana.is>2019-01-01 08:01:14 -0600
commitf7f5b7f4ee17027438135249b1f8b035742206c0 (patch)
treed3fb8e0a2cd3bba210e3fa52432fab0bc951942d
parent1f8bea22473f5f8f829c604899bd39a896c804f1 (diff)
downloadzsh-f7f5b7f4ee17027438135249b1f8b035742206c0.tar.gz
zsh-f7f5b7f4ee17027438135249b1f8b035742206c0.tar.xz
zsh-f7f5b7f4ee17027438135249b1f8b035742206c0.zip
43960: Add full completion for exec and setsid
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Linux/Command/_setsid12
-rw-r--r--Completion/Zsh/Command/_exec9
-rw-r--r--Completion/Zsh/Command/_precommand2
4 files changed, 26 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6740ad6a4..c61e4f04e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2018-01-01  dana  <dana@dana.is>
 
+	* 43960: Completion/Linux/Command/_setsid,
+	Completion/Zsh/Command/_exec, Completion/Zsh/Command/_precommand:
+	Add full completion for exec and setsid
+
 	* 43959: Completion/Unix/Command/_ipsec,
 	Completion/Unix/Command/_swanctl, Completion/Unix/Type/_urls: Add
 	completion for strongSwan, &al.; complete unix:// URIs
diff --git a/Completion/Linux/Command/_setsid b/Completion/Linux/Command/_setsid
new file mode 100644
index 000000000..a8107e582
--- /dev/null
+++ b/Completion/Linux/Command/_setsid
@@ -0,0 +1,12 @@
+#compdef setsid
+
+[[ $service == setsid ]] && precommands+=( setsid )
+
+_arguments -s -S -A '-*' : \
+  '(: * -)'{-h,--help}'[display help information]' \
+  '(: * -)'{-V,--version}'[display version information]' \
+  '(-c --ctty)'{-c,--ctty}'[set controlling terminal to current one]' \
+  '(-f --fork)'{-f,--fork}'[always fork]' \
+  '(-w --wait)'{-w,--wait}'[wait for program to exit, and use same return code]' \
+  '1: :_path_commands' \
+  '*:: : _normal'
diff --git a/Completion/Zsh/Command/_exec b/Completion/Zsh/Command/_exec
new file mode 100644
index 000000000..8de341a02
--- /dev/null
+++ b/Completion/Zsh/Command/_exec
@@ -0,0 +1,9 @@
+#compdef exec
+
+[[ $service == exec ]] && precommands+=( exec )
+
+_arguments -s -S -A '-*' : \
+  '-a+[set argv\[0\] to specified string]:argv[0] string' \
+  '-c[clear environment]' \
+  '-l[simulate login shell (prepend - to argv\[0\])]' \
+  '*:: : _normal'
diff --git a/Completion/Zsh/Command/_precommand b/Completion/Zsh/Command/_precommand
index f57e668c6..c9eef78af 100644
--- a/Completion/Zsh/Command/_precommand
+++ b/Completion/Zsh/Command/_precommand
@@ -1,4 +1,4 @@
-#compdef - nohup eval time rusage noglob nocorrect exec catchsegv aoss hilite eatmydata setsid
+#compdef - nohup eval time rusage noglob nocorrect catchsegv aoss hilite eatmydata
 
 # precommands is made local in _main_complete
 precommands+=($words[1])