Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: update completions affected by FreeBSD 14.3



Not too much of consequence, just one or two new options to commands
that already have too many options.

Oliver

diff --git a/Completion/BSD/Command/_jexec b/Completion/BSD/Command/_jexec
index cd99ebe91..510a35976 100644
--- a/Completion/BSD/Command/_jexec
+++ b/Completion/BSD/Command/_jexec
@@ -12,8 +12,9 @@ _jexec_normal() {
 _jexec() {
   _arguments -s -S -A "-*" : \
     '-l[execute in a clean environment]' \
-    '(-U)-u[host environment user whom command runs as]:host user:_users' \
-    '(-u)-U[jail environment user whom command runs as]:jail user:_users' \
+    '-d+[specify working directory inside the jail]: :_directories' \
+    '(-U)-u+[host environment user whom command runs as]:host user:_users' \
+    '(-u)-U+[jail environment user whom command runs as]:jail user:_users' \
     '1:jail:_jails' \
     '*:: : _jexec_normal'
 }
diff --git a/Completion/BSD/Command/_procstat b/Completion/BSD/Command/_procstat
index 867ddc501..fafe3019f 100644
--- a/Completion/BSD/Command/_procstat
+++ b/Completion/BSD/Command/_procstat
@@ -22,6 +22,6 @@ _arguments -s -A "-*" -S \
   '-C[print additional capability information for file descriptors]' \
   '-H[statistics per-thread rather than per-process]' \
   '-n[numeric form for signals]' \
-  '1::command:(advlock argument auxv basic binary cpuset credential environment fd file kstack pargs ptlwpinfo pwdx rlimit rlimitusage rusage sigfastblock signal thread tsignal vm)' \
+  '1::command:(advlock argument auxv basic binary cpuset credential environment fd file kqueue kstack pargs ptlwpinfo pwdx rlimit rlimitusage rusage sigfastblock signal thread tsignal vm)' \
   '2::core file:_path_files -g "*core*(-.)"' \
   '*:process id:_pids'
diff --git a/Completion/BSD/Command/_sockstat b/Completion/BSD/Command/_sockstat
index b99d3681a..953072429 100644
--- a/Completion/BSD/Command/_sockstat
+++ b/Completion/BSD/Command/_sockstat
@@ -32,6 +32,7 @@ case $OSTYPE in
   freebsd<14->.*)
     args+=(
       '-I[show local address of socket to which the current socket is spliced]'
+      '-f[show the FIB number of each socket]'
     )
   ;|
   freebsd*)
diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl
index 09995c98e..26fe1adba 100644
--- a/Completion/Unix/Command/_sysctl
+++ b/Completion/Unix/Command/_sysctl
@@ -40,6 +40,9 @@ case $OSTYPE in
     args+=(
       '-F[print the format of the variable]'
       '(-N)-l[show the length of variables along with their values]'
+      '-j+[perform the actions inside a jail]: :_jails'
+      '-J[display only jail sysctl variables]'
+      '-V[display only VNET sysctl variables]'
     )
   ;|
   freebsd<11->.*)
diff --git a/Completion/Unix/Command/_timeout b/Completion/Unix/Command/_timeout
index 9c7f1a004..f1961012d 100644
--- a/Completion/Unix/Command/_timeout
+++ b/Completion/Unix/Command/_timeout
@@ -2,14 +2,13 @@
 
 local args
 
-if [[ $service = g* || $OSTYPE != *(freebsd|netbsd|openbsd)* ]]; then
-  # GNU coreutils or DFly as opposed to Free/Net/OpenBSD implementation
-  args=(
-    '(-v --verbose)'{-v,--verbose}'[indicate when signal is sent upon timeout]'
-    '(- *)--help[display usage information]'
-    '(- *)--version[display version information]'
-  )
-fi
+[[ $service = g* || $OSTYPE != *(netbsd|openbsd)* ]] && args=(
+  '(-v --verbose)'{-v,--verbose}'[indicate when signal is sent upon timeout]'
+)
+[[ $service = g* || $OSTYPE != *(#i)(dragonfly|(free|net|open)bsd)* ]] && args+=(
+  '(- *)--help[display usage information]'
+  '(- *)--version[display version information]'
+)
 
 _arguments -S -A "-" $args \
   '--preserve-status[always exit with the same status as command even if it times out]' \
diff --git a/Completion/Unix/Command/_top b/Completion/Unix/Command/_top
index 692df790d..11cf886a5 100644
--- a/Completion/Unix/Command/_top
+++ b/Completion/Unix/Command/_top
@@ -85,6 +85,7 @@ case $OSTYPE in
       '-w[display approximate swap usage]'
       "-z[don't display system idle process]"
       '-J+[show processes owned by the specified jail]:jail:_jails -0'
+      '-T[display thread ID instead of process ID]'
       '-U+[show processes owned by the specified username]: :_users'
     );;
   openbsd*)
diff --git a/Completion/Unix/Command/_uniq b/Completion/Unix/Command/_uniq
index d2e10494a..efd556de8 100644
--- a/Completion/Unix/Command/_uniq
+++ b/Completion/Unix/Command/_uniq
@@ -3,16 +3,16 @@
 local args
 
 args=(
-  '(-c --count)'{-c,--count}'[prefix lines by the number of occurrences]'
-  '(-d --repeated)'{-d,--repeated}'[only print duplicate lines]'
-  '(--all-repeated)-D-[print all duplicate lines]'
-  '(-D)--all-repeated=-[print all duplicate lines]::delimit method [none]:(none prepend separate)'
+  '(-c --count -u --unique)'{-c,--count}'[prefix lines by the number of occurrences]'
+  '(-d --repeated -u --unique -D --all-repeated)'{-d,--repeated}'[only print a single copy of duplicate lines]'
+  '(--all-repeated -d --repeated -u --unique)-D[print all duplicate lines]'
+  '(-D -d --repeated -u --unique)--all-repeated=-[print all duplicate lines]::delimit method [none]:(none prepend separate)'
   '(-f --skip-fields)'{-f,--skip-fields=}'[avoid comparing initial fields]:number of fields'
   '--group=-[show all items]::group separation [separate]:(separate prepend append both)'
   '(-i --ignore-case)'{-i,--ignore-case}'[ignore differences in case when comparing]'
-  '(-s --skip-chars)'{-s,--skip-chars=}'[avoid comparing initial characters]:number of characters'
-  '(-u --unique)'{-u,--unique}'[only print unique lines]'
-  '(-w --check-chars)'{-w,--check-chars=}'[specify maximum number of characters to compare]:characters'
+  '(-s --skip-chars)'{-s+,--skip-chars=}'[avoid comparing initial characters]:number of characters'
+  '(-u --unique -c --count -d --repeated -D --all-repeated)'{-u,--unique}'[only print unique lines]'
+  '(-w --check-chars)'{-w+,--check-chars=}'[specify maximum number of characters to compare]:characters'
   '(-z --zero-terminated)'{-z,--zero-terminated}'[delimit lines with null character, not newline]'
   '(- *)--help[display help information]'
   '(- *)--version[display version information]'




Messages sorted by: Reverse Date, Date, Thread, Author