summaryrefslogtreecommitdiffstats
path: root/Completion/Unix
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2026-06-14 22:32:05 +0200
committerOliver Kiddle <opk@zsh.org>2026-06-14 22:32:05 +0200
commit9bc0028bb7b59d80d5238fa7b82f8633e4c47431 (patch)
tree223fc81a51d2d56c4f29f8541ce93331afe27497 /Completion/Unix
parent54762: make curjob and prevjob work better (diff)
downloadzsh-9bc0028bb7b59d80d5238fa7b82f8633e4c47431.tar
zsh-9bc0028bb7b59d80d5238fa7b82f8633e4c47431.tar.gz
zsh-9bc0028bb7b59d80d5238fa7b82f8633e4c47431.tar.bz2
zsh-9bc0028bb7b59d80d5238fa7b82f8633e4c47431.tar.lz
zsh-9bc0028bb7b59d80d5238fa7b82f8633e4c47431.tar.xz
zsh-9bc0028bb7b59d80d5238fa7b82f8633e4c47431.tar.zst
zsh-9bc0028bb7b59d80d5238fa7b82f8633e4c47431.zip
54665: new utility function for mixing in extra values
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_abcde2
-rw-r--r--Completion/Unix/Command/_postfix2
-rw-r--r--Completion/Unix/Command/_shutdown2
-rw-r--r--Completion/Unix/Command/_sleep25
-rw-r--r--Completion/Unix/Command/_ssh12
-rw-r--r--Completion/Unix/Command/_zfs6
6 files changed, 37 insertions, 12 deletions
diff --git a/Completion/Unix/Command/_abcde b/Completion/Unix/Command/_abcde
index 6b09d87b5..be18d7f05 100644
--- a/Completion/Unix/Command/_abcde
+++ b/Completion/Unix/Command/_abcde
@@ -34,7 +34,7 @@ _arguments -s -S -A "-*" \
'(- :)-v[show the version and exit]' \
'-V[be more verbose]' \
'-x[eject the CD when all tracks have been read]' \
- '-X+[use an alternative "cue2discid" implementation]:cue2discid:_command_names -e' \
+ '-X+[use an alternative "cue2discid" implementation]:cue2discid:_phony builtin _command_names -e' \
'-w+[add a comment to the tracks ripped from the CD]:comment' \
"-W+[concatenate CD's]:cd-number" \
'-z[debug mode]' \
diff --git a/Completion/Unix/Command/_postfix b/Completion/Unix/Command/_postfix
index 006c950e3..8c172b424 100644
--- a/Completion/Unix/Command/_postfix
+++ b/Completion/Unix/Command/_postfix
@@ -67,7 +67,7 @@ case $service in
'-d[delete]:queue id:_postfix_queue_id' \
'-h[hold]:queue id:_postfix_queue_id' \
'-H[release]:queue id:_postfix_queue_id' \
- '*-r[requeue]:queue id, or "ALL":_postfix_queue_id' \
+ '*-r[requeue]:queue id:_phony ALL _postfix_queue_id' \
'1:queue:(hold incoming active deferred)'
;;
(postqueue)
diff --git a/Completion/Unix/Command/_shutdown b/Completion/Unix/Command/_shutdown
index a237b14e0..2020b9d17 100644
--- a/Completion/Unix/Command/_shutdown
+++ b/Completion/Unix/Command/_shutdown
@@ -23,7 +23,7 @@ case $OSTYPE in
'-r[reboot the system]'
'-k[kick everybody off]'
'-n[prevent file system cache from being flushed]'
- '1: :_guard "^-*" "time (now/hh\:mm/+mins)"'
+ '1:time (hh\:mm/+mins):_phony now -- _guard "^-*" "time (hh\:mm/+mins)"' \
'*:warning message'
)
;|
diff --git a/Completion/Unix/Command/_sleep b/Completion/Unix/Command/_sleep
new file mode 100644
index 000000000..677062ab9
--- /dev/null
+++ b/Completion/Unix/Command/_sleep
@@ -0,0 +1,25 @@
+#compdef sleep
+
+local sum inf fraction
+local -a expl units
+
+case $OSTYPE in
+ linux-gnu)
+ args=(
+ -S
+ '--help[display help information]'
+ '--version[display version information]'
+ )
+ ;& # fall-through
+ solaris*)
+ inf="_phony infinity --"
+ ;& # fall-through
+ darwin*|freebsd*)
+ units=( :s:seconds m:minutes h:hours d:days )
+ sum='*'
+ fraction='-f'
+ ;;
+esac
+
+_arguments $args \
+ "${sum}:interval:$inf _numbers $fraction -u seconds interval $units"
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 9ab1a1139..c95849e84 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -13,7 +13,7 @@ _ssh () {
'-A[enable forwarding of the authentication agent connection]'
'-C[compress data]'
'-c+[select encryption cipher]:encryption cipher:->ciphers'
- '-F+[specify alternate config file]:config file:_files'
+ '-F+[specify alternate config file]:config file:_phony none _files'
'*-i+[select identity file]:SSH identity file:_files -g "*(-.^AR)"'
'*-o+[specify extra options]:option string:->option'
)
@@ -41,7 +41,7 @@ _ssh () {
'-B+[bind to specified interface before attempting to connect]:interface:_net_interfaces' \
'(-P)-b+[specify interface to transmit on]:bind address:_bind_addresses' \
'-D+[specify a dynamic port forwarding]:dynamic port forwarding:->dynforward' \
- '-e+[set escape character]:escape character (or `none'\''):' \
+ '-e+[set escape character]:escape character:_phony none' \
'-E+[append log output to file instead of stderr]:log file:_files' \
'(-n)-f[go to background]' \
'-g[allow remote hosts to connect to local forwarded ports]' \
@@ -61,7 +61,7 @@ _ssh () {
'-p+[specify port on remote host]:port number on remote host' \
'(-v)*-q[quiet operation]' \
'*-R+[specify remote port forwarding]:remote port forwarding:->forward' \
- '-S+[specify location of control socket for connection sharing]:path to control socket:_files' \
+ '-S+[specify location of control socket for connection sharing]:path to control socket:_phony none _files' \
'(- 1 *)-Q+[query parameters]:query option:((cipher\:"supported symmetric ciphers" cipher-auth\:"supported symmetric ciphers that support authenticated encryption" compression mac\:"supported message integrity codes" kex\:"key exchange algorithms" kex-gss\:"GSSAPI key exchange algorithms" key\:"key types" key-cert\:"certificate key types" key-plain\:"non-certificate key types" key-sig\:"all key types and signature algorithms" protocol-version\:"supported SSH protocol versions" sig\:"supported signature algorithms" help\:"show supported queries" HostbasedAcceptedAlgorithms HostKeyAlgorithms KexAlgorithms MACs PubkeyAcceptedAlgorithms))' \
'-s[invoke subsystem]' \
'(-t)-T[disable pseudo-tty allocation]' \
@@ -263,7 +263,7 @@ _ssh () {
"$p1($cmn -f -k -u -D)-U[indicate that CA key is held by ssh-agent]" \
"$p1($cmn -f -k -u -U)-D+[indicate the CA key is stored in a PKCS#11 token]:PKCS11 shared library:_files -g '*.(so|dylib)(|.<->)(-.)'" \
"$p1($cmn -f -k -u)-n+[specify user/host principal names to include in certificate]:principals" \
- "$p1($cmn -f -u)-V+[specify certificate validity interval]:interval" \
+ "$p1($cmn -f -u)-V+[specify certificate validity interval]:interval:_phony -S\: always" \
"($cmn -I -h -n -D -O -U -V)-k[generate a KRL file]" \
"$p1($cmn -I -h -n -D -O -U -V)-u[update a KRL]" \
- signature \
@@ -402,8 +402,8 @@ _ssh () {
'values:truth value:(yes no)' && ret=0
;;
(#i)escapechar=*)
- _message -e 'escape character (or `none'\'')'
- ret=0
+ _description escape-characters expl 'escape character'
+ _phony "$expl[@]" none && ret=0
;;
(#i)fingerprinthash=*)
_values 'fingerprint hash algorithm' \
diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs
index 3a884439b..3e2882536 100644
--- a/Completion/Unix/Command/_zfs
+++ b/Completion/Unix/Command/_zfs
@@ -169,8 +169,8 @@ case $service:$implementation in
'userobjquota@'
'vscan:value:(on off)'
'xattr:value:(on off dir sa)'
- "filesystem_limit: :{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ -prefix n ]]; then compadd none; else _message -e limits 'number or none'; fi}"
- "snapshot_limit: :{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ -prefix n ]]; then compadd none; else _message -e limits 'number or none'; fi}"
+ "filesystem_limit:unlimited:_phony none _numbers limit"
+ "snapshot_limit:unlimited:_phony none _numbers limit"
'volmode:mode:((
default\:use\ system-wide\ tunable
full\:expose\ as\ block\ devices
@@ -1023,7 +1023,7 @@ case $service:$words[1] in
'-f[force use of in-use devices]' \
'-n[display configuration without creating pool]' \
'-R+[use alternate root]:alternate root:_directories' \
- '-m+[set mountpoint for root dataset]:mountpoint' \
+ '-m+[set mountpoint for root dataset]:mountpoint:_phony none _path_files -/ -P / -W /' \
'-t+[use a temporary pool name]:pool name' \
':pool :_guard "^-*" "pool name"' \
'*: :->virtual-devices'