From 6306dcfaa52237fbaa76eafe7bc396e68eda66ca Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 17 Nov 2023 18:13:41 +0100 Subject: 52303: updates to completions for macOS 13 --- Completion/Unix/Command/_mv | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Completion/Unix/Command/_mv') diff --git a/Completion/Unix/Command/_mv b/Completion/Unix/Command/_mv index 84e43d47e..c52e7a5e4 100644 --- a/Completion/Unix/Command/_mv +++ b/Completion/Unix/Command/_mv @@ -13,13 +13,17 @@ case $variant; in {existing,nil}"[numbered backups, if they already exist]" {simple,never}"[always make simple backups]"' '(-b --backup -n --no-clobber)-b[make a backup of each existing destination file]' + '(-v)--debug[explain how a file is copied]' '(-f --force -i --interactive -n --no-clobber)'{-f,--force}"[don't prompt before overwriting]" '(-f --force -i --interactive -n --no-clobber)'{-i,--interactive}'[prompt before overwriting existing file]' + '(-f --force -i --interactive -n --no-clobber)'{-n,--no-clobber}"[don't overwrite existing file]" + "--no-copy[don't copy if renaming fails]" '--strip-trailing-slashes[remove any trailing slashes from each source argument]' '(-S --suffix)'{-S+,--suffix=}'[specify the backup suffix]:backup suffix [~]' '(-t --target-directory)'{-t+,--target-directory=}'[move all source arguments into specified directory]:directory:_directories' '(-T --no-target-directory)'{-T,--no-target-directory}'[treat final argument as a normal file]' - '(-u --update)'{-u,--update}'[move only when destination file is older or missing]' + '(-u)--update=-[move only when destination file is older or missing]::update files [older]:(all none older)' + '(--update)-u[move only when destination file is older or missing]' '(-v --verbose)'{-v,--verbose}'[show file names after they are moved]' '(- *)--help[display usage information]' '(- *)--version[display version information]' @@ -37,6 +41,7 @@ case $variant; in darwin*|dragonfly*|freebsd*) args+=( "(-f -i)-n[don't overwrite existing file]" + "-h[if target is a symlink to a directory, don't follow it]" ) ;| darwin*|dragonfly*|*bsd*) @@ -44,11 +49,6 @@ case $variant; in '-v[show file names after they are moved]' ) ;| - dragonfly*|freebsd*) - args+=( - "-h[if target is a symlink to a directory, don't follow it]" - ) - ;; esac _arguments -s -S $aopts $args \ -- cgit v1.2.3 From 87aba4d437f5fef46917c1235c00b9162d7bcbd0 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 27 Jan 2025 23:00:17 +0100 Subject: 53325: cover newer BSD releases in completion --- ChangeLog | 15 +++++++++++++++ Completion/BSD/Command/_acpiconf | 28 ++++++++++++++++++++++++++++ Completion/BSD/Command/_bsdconfig | 1 + Completion/BSD/Command/_pkgin | 2 ++ Completion/BSD/Command/_procstat | 35 ++++++++++++++++++----------------- Completion/BSD/Command/_sockstat | 5 +++++ Completion/BSD/Command/_systat | 1 + Completion/Unix/Command/_date | 17 ++++++++++++++--- Completion/Unix/Command/_df | 19 ++++++++++++------- Completion/Unix/Command/_dhclient | 1 + Completion/Unix/Command/_dmidecode | 6 ++++-- Completion/Unix/Command/_env | 14 +++++++++++--- Completion/Unix/Command/_iostat | 3 +++ Completion/Unix/Command/_last | 14 +++++++------- Completion/Unix/Command/_ls | 6 +++++- Completion/Unix/Command/_mv | 8 ++++---- Completion/Unix/Command/_ps | 2 +- Completion/Unix/Command/_script | 13 +++++++++++-- Completion/Unix/Command/_sed | 6 ++++-- Completion/Unix/Command/_vmstat | 6 +++++- Completion/Unix/Command/_w | 7 ++++++- Completion/Unix/Command/_wc | 2 +- Completion/Unix/Command/_zfs | 31 +++++++++++++++++++++++-------- 23 files changed, 182 insertions(+), 60 deletions(-) create mode 100644 Completion/BSD/Command/_acpiconf (limited to 'Completion/Unix/Command/_mv') diff --git a/ChangeLog b/ChangeLog index ba7054a8e..2585d50e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2025-01-27 Oliver Kiddle + + * 53325: Completion/BSD/Command/_acpiconf, + Completion/BSD/Command/_bsdconfig, Completion/BSD/Command/_pkgin, + Completion/BSD/Command/_procstat, Completion/BSD/Command/_sockstat, + Completion/BSD/Command/_systat, Completion/Unix/Command/_date, + Completion/Unix/Command/_df, Completion/Unix/Command/_dhclient, + Completion/Unix/Command/_dmidecode, Completion/Unix/Command/_env, + Completion/Unix/Command/_iostat, Completion/Unix/Command/_last, + Completion/Unix/Command/_ls, Completion/Unix/Command/_mv, + Completion/Unix/Command/_ps, Completion/Unix/Command/_script, + Completion/Unix/Command/_sed, Completion/Unix/Command/_vmstat, + Completion/Unix/Command/_w, Completion/Unix/Command/_wc, + Completion/Unix/Command/_zfs: cover newer BSD releases in completion + 2025-01-20 Bart Schaefer * Julian Prein: 53309: Completion/Unix/Command/_uniq: remove diff --git a/Completion/BSD/Command/_acpiconf b/Completion/BSD/Command/_acpiconf new file mode 100644 index 000000000..817a2f1ad --- /dev/null +++ b/Completion/BSD/Command/_acpiconf @@ -0,0 +1,28 @@ +#compdef acpiconf + +local curcontext="$curcontext" sep ret=1 +local -a state line modes desc +local -A opt_args + +_arguments -s \ + '(-)-h[display usage information]' \ + '(-)-i[get battery information]:battery' \ + '(-)-k[ack or abort a pending suspend]:ack' \ + '(-)-s[enter specified sleep mode]: :->modes' && ret=0 + +if [[ -n $state ]]; then + modes=( $(_call_program modes sysctl -n hw.acpi.supported_sleep_state) ) + zstyle -s ":completion:${curcontext}:modes" list-separator sep || sep=-- + (( $#modes )) || modes=( S3 S4 ) + desc=( + "S1 $sep stop the processor clock" + "S2 $sep low wake latency sleep state" + "S3 $sep suspend to RAM" + "S4 $sep suspend to disk" + "S5 $sep soft off state" + ) + desc=( ${(M)desc:#(${(~j.|.)modes}) *} ) + _wanted modes expl 'mode' compadd -M 'B:S=' -ld desc - ${modes#S} && ret=0 +fi + +return ret diff --git a/Completion/BSD/Command/_bsdconfig b/Completion/BSD/Command/_bsdconfig index f88255575..5de8f777d 100644 --- a/Completion/BSD/Command/_bsdconfig +++ b/Completion/BSD/Command/_bsdconfig @@ -51,6 +51,7 @@ shortcuts=( vt_saver vt_screenmap vt_ttys + wifi wireless wlan ) _arguments -s -w -A '-*' : \ diff --git a/Completion/BSD/Command/_pkgin b/Completion/BSD/Command/_pkgin index 662bed181..c4ed3aa14 100644 --- a/Completion/BSD/Command/_pkgin +++ b/Completion/BSD/Command/_pkgin @@ -5,6 +5,8 @@ local -a state state_descr line expl cmds short pkgs local -A opt_args _arguments -s -S -C \ + '(-6)-4[only use IPv4 addresses]' \ + '(-4)-6[only use IPv6 addresses]' \ '-c+[enable chrooting pkgin in the given repository]:chroot path:_directories' \ '-d[download only]' \ '-f[force database update]' \ diff --git a/Completion/BSD/Command/_procstat b/Completion/BSD/Command/_procstat index a1708f6ac..867ddc501 100644 --- a/Completion/BSD/Command/_procstat +++ b/Completion/BSD/Command/_procstat @@ -1,26 +1,27 @@ #compdef procstat _arguments -s -A "-*" -S \ - '-b[show binary information]' \ - '-c[show command line arguments]' \ - '-e[show environment variables]' \ - '-f[show file descriptor information]' \ - '-i[show signal pending and disposition]' \ - '-j[show signal pending and blocked information for process threads]' \ - '-k[show stacks of kernel threads]' \ - '-l[show resource limits]' \ - "-L[show LWP info for the process pertaining to it's signal driven exit]" \ - '-r[show resource usage]' \ - '-s[show security credential information]' \ - '-S[show cpuset information]' \ - '-t[show thread information]' \ - '-v[show virtual memory mappings]' \ - '-x[show ELF auxiliary vector]' \ + '(1)-b[show binary information]' \ + '(1)-c[show command line arguments]' \ + '(1)-e[show environment variables]' \ + '(1)-f[show file descriptor information]' \ + '(1)-i[show signal pending and disposition]' \ + '(1)-j[show signal pending and blocked information for process threads]' \ + '(1)-k[show stacks of kernel threads]' \ + '(1)-l[show resource limits]' \ + "(1)-L[show LWP info for the process pertaining to it's signal driven exit]" \ + '(1)-r[show resource usage]' \ + '(1)-s[show security credential information]' \ + '(1)-S[show cpuset information]' \ + '(1)-t[show thread information]' \ + '(1)-v[show virtual memory mappings]' \ + '(1)-x[show ELF auxiliary vector]' \ '-h[suppress table headers]' \ - '(1)-a[all processes]' \ + '(2 *)-a[all processes]' \ '-w+[repeat information after specified interval]:delay (seconds)' \ '-C[print additional capability information for file descriptors]' \ '-H[statistics per-thread rather than per-process]' \ '-n[numeric form for signals]' \ - '1::core file:_path_files -g "*core*(-.)"' \ + '1::command:(advlock argument auxv basic binary cpuset credential environment fd file 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 f372fe1b3..b99d3681a 100644 --- a/Completion/BSD/Command/_sockstat +++ b/Completion/BSD/Command/_sockstat @@ -29,6 +29,11 @@ case $OSTYPE in '-q[quiet mode, do not print the header line]' ) ;| + freebsd<14->.*) + args+=( + '-I[show local address of socket to which the current socket is spliced]' + ) + ;| freebsd*) for proto in ${${(M)${(f)"$(.*) args+=( '-d+:daylight saving time value' @@ -77,6 +83,11 @@ else freebsd<14->.*|openbsd*) args+=( '-z+[specify timezone for output]:time zone:_time_zone') ;| + freebsd*) + args+=( + '(-R)-I-[display in ISO 8601 format]::precision [date]:(date hours minutes seconds ns)' + ) + ;| netbsd*) args+=( '-d[output date specified by string]:time string:' ) ;; diff --git a/Completion/Unix/Command/_df b/Completion/Unix/Command/_df index 21abff105..315758488 100644 --- a/Completion/Unix/Command/_df +++ b/Completion/Unix/Command/_df @@ -45,21 +45,25 @@ elif [[ "$OSTYPE" == (darwin|dragonfly|freebsd|netbsd*|openbsd)* ]]; then '-a[show all mount points]' '(-b -g -H -h -k -m --si)-g[use 1024^3-byte blocks]' '(-b -g -H -h -k -m --si)-m[use 1024*1024-byte blocks]' - ) - ;| - (darwin*|dragonfly*|freebsd*) - args+=( '(-b -g -H -h -k -m --si)-b[use 512-byte blocks (default)]' '(-b -g -H -h -k -m --si)-H[human-readable output (base 10)]' ) ;| - (darwin*|freebsd*) + (darwin*|freebsd*|netbsd*) args+=( '-c[display a grand total]' ) + ;| + (darwin*|freebsd*) + args+=( + '--libxo[generate output via libxo]' + '-,[separate thousands]' + ) ;| (darwin*) args+=( + '-I[suppress inode counts]' + '-Y[include file system type]' "-T+$spec" "!-t+$spec" # obsolete ) @@ -76,14 +80,15 @@ elif [[ "$OSTYPE" == (darwin|dragonfly|freebsd|netbsd*|openbsd)* ]]; then ;| (freebsd*) args+=( - '--libxo[generate output via libxo]' '(-b -g -H -h -k -m --si)--si[human-readable output (base 10)]' - '-,[separate thousands]' ) ;; (netbsd*) args+=( + '(-P -G -N)-f[display only the available free]' '(-G -i -P)-G[display all fields in statvfs]' + '(-G -P)-N[suppress the header line normally output]' + '-W[print widge name instead of the device]' ) ;; esac diff --git a/Completion/Unix/Command/_dhclient b/Completion/Unix/Command/_dhclient index e22586b04..f38e9a9e5 100644 --- a/Completion/Unix/Command/_dhclient +++ b/Completion/Unix/Command/_dhclient @@ -12,6 +12,7 @@ case $OSTYPE in args+=( '(-d)-b[immediately move to the background]' '-l+[specify leases file]:file:_files' + "-n[don't wait for ARP resolution]" '-p+[specify PID file]:file:_files' '-u[reject leases with unknown options]' '-q[quiet]' diff --git a/Completion/Unix/Command/_dmidecode b/Completion/Unix/Command/_dmidecode index e2c511313..62a950a7a 100644 --- a/Completion/Unix/Command/_dmidecode +++ b/Completion/Unix/Command/_dmidecode @@ -5,8 +5,10 @@ _arguments -s \ '(-)'{-h,--help}'[display usage information]' \ '(-q --quiet -u --dump)'{-q,--quiet}'[be less verbose]' \ '--no-quirks[decode everything without quirks]' \ - '(-t --type -H --handle -u --dump --dump-bin -s --string)'{-s+,--string=}'[only display value of specified DMI string]:DMI string:(bios-vendor bios-version bios-release-date system-manufacturer system-product-name system-version system-serial-number system-uuid baseboard-manufacturer baseboard-product-name baseboard-version baseboard-serial-number baseboard-asset-tag chassis-manufacturer chassis-type chassis-version chassis-serial-number chassis-asset-tag processor-family processor-manufacturer processor-version processor-frequency)' \ - '(-s --string -H --handle --dump-bin)*'{-t+,--type=}'[only display entries of specified type]:entry type:(bios system baseboard chassis processor memory cache connector slot)' \ + '(-t --type -H --handle -u --dump --dump-bin -s --string)'{-s+,--string=}'[only display value of specified DMI string]:DMI string:compadd -M "r\:|-=* r\:|=*" - $(_call_program strings dmidecode --list-strings)' \ + '--list-strings[list available string keywords]' \ + '(-s --string -H --handle --dump-bin)*'{-t+,--type=}'[only display entries of specified type]:entry type:compadd - $(_call_program types dmidecode --list-types)' \ + '--list-types[list available type keywords]' \ '(-s --string -t --type -H --handle --dump-bin)'{-H,--handle=}'[only display the entry of specified handle]:handle' \ '(-q --quiet -u --dump -s --string)'{-u,--dump}"[don't decode entries]" \ '(-s --string -t --type -H --handle)--dump-bin=[dump DMI data to a binary file]:file:_files' \ diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env index 8cf0ad467..89a45e4a4 100644 --- a/Completion/Unix/Command/_env +++ b/Completion/Unix/Command/_env @@ -8,6 +8,7 @@ case $variant in gnu) (( $#words > 2 )) && ign='!' args=( + '(-a --argv0)'{-a+,--argv0=}'[pass argument as the zeroth argument of command]:argument' '(-)'{-i,--ignore-environment}'[start with empty environment]' '(* -0 --null)'{-0,--null}'[end each output line with NUL, not newline]' '(--ignore-environment -i --help --version)*'{-u+,--unset=}'[remove variable from the environment]:env var to remove:_parameters -g "*export*"' @@ -28,12 +29,19 @@ case $variant in '-U[add variables from user and system login.conf(5)]: :->user-class' ) ;| - freebsd*|darwin*) - args=( '-0[use NUL, not newline after each variable in output]' ) + freebsd*|netbsd*) + args+=( '-C+[change working directory]:directory:_directories' ) ;| - freebsd*|darwin*|dragonfly*) + freebsd*|darwin*|netbsd*) + args+=( '-0[use NUL, not newline after each variable in output]' ) + ;| + freebsd*|darwin*|dragonfly*|netbsd*|openbsd*) args+=( '(-i)*-u+[remove variable from the environment]:env var to remove:_parameters -g "*export*"' + ) + ;| + freebsd*|darwin*|dragonfly*) + args+=( '-P+[specify alternate executable search PATH]:path:_dir_list' '-S+[perform word splitting]:string to split' '*-v[verbose output]' diff --git a/Completion/Unix/Command/_iostat b/Completion/Unix/Command/_iostat index d3943fcb4..36a3b7904 100644 --- a/Completion/Unix/Command/_iostat +++ b/Completion/Unix/Command/_iostat @@ -50,6 +50,9 @@ case $OSTYPE:l in args+=( '-x[show extended disk statistics]' '-y[report data on waiting and active requests]' + '-z[replace drive and CPU statistics that are zero with spaces]' + "-H+[set page height explicitly]:height [$LINES]" + "-W+[set page width explicitly]:width [$COLUMNS]" ) ;; aix*) diff --git a/Completion/Unix/Command/_last b/Completion/Unix/Command/_last index 2013cc1c2..d76260c36 100644 --- a/Completion/Unix/Command/_last +++ b/Completion/Unix/Command/_last @@ -8,17 +8,16 @@ ttys=( ${ttys#/dev/} ) for pattern arg in \ '(solaris*|linux-gnu)' '(--hostlast)-a[display hostname in last column]' \ '((free|net|open)bsd*|darwin*|dragonfly*)' '-h+[limit sessions by hostname]:host:_hosts' \ - '((free|open)bsd*)' '-s[report duration in seconds]' \ - '(freebsd*|openbsd*)' '-d+[limit sessions to those active at snapshot time]:time ([[CC]YY][MMDD]hhmm[.SS])' \ + '((free|open)bsd*|darwin*)' '-s[report duration in seconds]' \ + '((free|open)bsd*|darwin*)' '-d+[limit sessions to those active at snapshot time]:time ([[CC]YY][MMDD]hhmm[.SS])' \ '((net|free|open)bsd*|darwin*|dragonfly*)' '-t+[limit sessions by tty]:tty:_ttys -D' \ 'openbsd*' '-c[calculate total time]' \ - '^darwin*' '(--file)-f+[specify account file]:file:_files' \ - '(solaris*|linux-gnu|freebsd*|openbsd*)' '(--limit)-n+[specify number of lines to show]:number' \ + '(solaris*|darwin*|linux-gnu|freebsd*|openbsd*)' '(--limit)-n+[specify number of lines to show]:number' \ '((open|net)bsd*|dragonfly*)' '-T[show more detailed time information including year and seconds]' \ 'netbsd*' '-x[assume file is in wtmpx(5) format]' \ 'netbsd*' '-n[show IP of remote hosts]' \ - 'freebsd*' '-w[show seconds in duration field]' \ - 'freebsd*' '-y[show year in session start time]' + '(freebsd*|darwin*)' '-w[show seconds in duration field]' \ + '(freebsd*|darwin*)' '-y[show year in session start time]' do [[ $OSTYPE = $~pattern ]] && args+=( $arg ) done @@ -58,4 +57,5 @@ else args+=( '*:user:_users' ) fi -_arguments -s -S $args +_arguments -s -S $args \ + '(--file)-f+[specify account file]:file:_files' diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls index 392b8490b..a19ad30e2 100644 --- a/Completion/Unix/Command/_ls +++ b/Completion/Unix/Command/_ls @@ -61,12 +61,16 @@ if ! _pick_variant gnu=gnu unix --help; then '(-l -1 -C -m -x)-g[long listing but without owner information]' ) fi + if [[ $OSTYPE = (netbsd*|darwin*) ]]; then + arguments+=( + "-X[don't cross mount points when recursing]" + ) + fi if [[ $OSTYPE = netbsd* ]]; then arguments+=( '-M[output file sizes in comma-separated form]' '-O[output only leaf (non-directory) files]' '-P[print full pathname for each file]' - "-X[don't cross mount points when recursing]" ) fi if [[ $OSTYPE = (dragonfly*|freebsd*|openbsd*|darwin*) ]]; then diff --git a/Completion/Unix/Command/_mv b/Completion/Unix/Command/_mv index c52e7a5e4..983c25ea8 100644 --- a/Completion/Unix/Command/_mv +++ b/Completion/Unix/Command/_mv @@ -38,11 +38,11 @@ case $variant; in '(-f -n)-i[prompt before overwriting existing file]' ) ;| + darwin*|dragonfly*|freebsd*|netbsd*) + args+=( "-h[if target is a symlink to a directory, don't follow it]" ) + ;| darwin*|dragonfly*|freebsd*) - args+=( - "(-f -i)-n[don't overwrite existing file]" - "-h[if target is a symlink to a directory, don't follow it]" - ) + args+=( "(-f -i)-n[don't overwrite existing file]" ) ;| darwin*|dragonfly*|*bsd*) args+=( diff --git a/Completion/Unix/Command/_ps b/Completion/Unix/Command/_ps index c3dfae47d..158fb6b83 100644 --- a/Completion/Unix/Command/_ps +++ b/Completion/Unix/Command/_ps @@ -106,9 +106,9 @@ case $OSTYPE in ;| linux-gnu|netbsd*) bsdarg+=( 'k[specify sort order]' ) ;| linux-gnu|openbsd*) bsd+=( 'f[show process hierarchy]' ) ;| + darwin*|freebsd*|netbsd*) bsdarg+=( '*G[select processes by real group]' ) ;| darwin*|freebsd*) bsd+=( 'X[skip processes with no controlling terminal]' ) - bsdarg+=( '*G[select processes by real group]' ) ;| freebsd*|dragonfly*) bsd+=( 'f[show command and environment for swapped out processes]' ) diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_script index d38d56f2e..25f8ea35f 100644 --- a/Completion/Unix/Command/_script +++ b/Completion/Unix/Command/_script @@ -50,19 +50,28 @@ case $OSTYPE in '(-d -p -T)-r[record a session with input, output and timing data]' ) ;| + darwin*|netbsd*|freebsd*) + args+=( + '-e[return exit status of the child process]' + ) + ;| netbsd*|openbsd*) args+=( '-c[run specified command instead of a shell]:command:_cmdstring' ) ;| + darwin*|freebsd*) + args+=( + '(-a -r -k -t)-T[play back a recorded session, reporting only timestamps]: :_date_formats' + ) + ;| netbsd*) args+=( '-f[flush output after each write]' ) ;| freebsd*) args+=( - '-e[return exit status of the child process]' '-f[use filemon(4)]' - '(-a -r -k -t)-T[play back a recorded session, reporting only timestamps]: :_date_formats' + '-w[forward terminal size changes on SIGWINCH]' ) ;| darwin*|dragonfly*|freebsd*) diff --git a/Completion/Unix/Command/_sed b/Completion/Unix/Command/_sed index ef3aaf2fd..ecbec61d1 100644 --- a/Completion/Unix/Command/_sed +++ b/Completion/Unix/Command/_sed @@ -104,7 +104,7 @@ else case $OSTYPE in openbsd*|freebsd*|netbsd*|darwin*|dragonfly*) args+=( - '(-r -E)'{-E,-r}$extended + '(-r -E -H)'{-E,-r}$extended '-a[delay opening files listed with w function]' ) ;| @@ -115,8 +115,10 @@ else args+=( '-I+[edit files in-place, treating all files as a single input stream]:: :_guard "^(*[@/; \\\]*|?(#c6,)|-*)" "suffix for backup"' ) - ;; + ;| openbsd*) args+=( '-u[make output line buffered]' ) ;; + darwin*) args+=( '(-r -E)-H[use enhanced regular expressions]' ) ;; + netbsd*) args+=( '(-r -E)-g[use GNU regular expressions]' '!(-r -E -g)-G' ) ;; esac fi diff --git a/Completion/Unix/Command/_vmstat b/Completion/Unix/Command/_vmstat index 6db776e62..1d0ac855d 100644 --- a/Completion/Unix/Command/_vmstat +++ b/Completion/Unix/Command/_vmstat @@ -37,10 +37,14 @@ case $OSTYPE in '-f[report on the number fork syscalls since boot and pages of virtual memory for each]' ) ;| + freebsd*|dragonfly*|netbsd*) + specs+=( + '-n+[change the maximum number of disks to display]:number of disks to display [2]' + ) + ;| freebsd*|dragonfly*) specs+=( '-m[report on the usage of kernel dynamic memory allocated using malloc(9) by type]' - '-n+[change the maximum number of disks to display]:number of disks to display [2]' '*-p+[specify which types of devices to display]: :->devices' '-s[display the contents of the SUM structure]' '-z[report on memory used by the kernel zone allocator, uma(9), by zone]' diff --git a/Completion/Unix/Command/_w b/Completion/Unix/Command/_w index e82c84f57..408cb76af 100644 --- a/Completion/Unix/Command/_w +++ b/Completion/Unix/Command/_w @@ -23,7 +23,7 @@ case $OSTYPE in openbsd*) args+=( '-a[translate network addresses into names]' ) ;| - (free|net)bsd*|dragonfly*) + (free|net)bsd*|dragonfly*|darwin*) args+=( '-n[show network addresses as numbers]' ) ;| *bsd*|dragonfly*) @@ -35,6 +35,11 @@ case $OSTYPE in freebsd*|dragonfly*) args+=( '-d[dump process list on a per controlling tty basis]' ) ;| + netbsd*) + args+=( + '-A[sort tty names alphabetically instead of utmp or utmpx order]' + ) + ;| solaris*) args+=( '!(-s -w -l)'{-l,-w} '-s[short output form]' diff --git a/Completion/Unix/Command/_wc b/Completion/Unix/Command/_wc index a1897e289..2a4f7ab05 100644 --- a/Completion/Unix/Command/_wc +++ b/Completion/Unix/Command/_wc @@ -18,7 +18,7 @@ if _pick_variant gnu=GNU unix --version; then else args=( -A "-*" "${(@)args:#(|\(*\))(|\*)--*}" ) case $OSTYPE in - freebsd*|netbsd*) args+=( '-L[print longest line lengths]' ) ;; + freebsd*|netbsd*|darwin*) args+=( '-L[print longest line lengths]' ) ;; openbsd*) args+=( '-h[human readable: use unit suffixes]' ) ;; solaris*) args+=( ${${(M)args:#*-m\[*}//-m\[/-C\[} ) ;; esac diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs index c09435a1f..5a45c2920 100644 --- a/Completion/Unix/Command/_zfs +++ b/Completion/Unix/Command/_zfs @@ -79,7 +79,7 @@ rw_ds_props=( 'paths:mountpoint:_directories -W / -P /'" 'multilevel:value:(on off)' 'nbmand:value:(on off)' - 'primarycache:value:(all none metadata)' + {prefetch,primarycache}':value:(all none metadata)' 'quota: :->quotas' 'readonly:value:(on off)' 'recordsize:value:(512 1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M)' @@ -515,9 +515,11 @@ case $service:$words[1] in ;; zfs:set) - [[ $implementation = solaris ]] && args=( - '-r[recursively apply value]' \ - ) + if [[ $implementation = solaris ]]; then + args=( '-r[recursively apply value]' ) + else + args=( "-u[update property but don't mount or share dataset]" ) + fi _arguments -C -A "-*" -S $args \ ':property:->set-properties' \ '*:filesystem/volume:_zfs_dataset -t fs -t vol' @@ -598,13 +600,14 @@ case $service:$words[1] in zfs:mount) [[ $OSTYPE != freebsd* ]] && args=( '-O[overlay mount]' ) [[ $implementation = openzfs ]] && args+=( - '-l[load keys for encrypted filesystems as they are being mounted]' + '-l[load keys for encrypted filesystems as they are being mounted]' + '(-a)-R[mount filesystems along with all their children]' ) _arguments -A "-*" -S $args \ '-o+[specify temporary file system options]: :_values -s , "option" {,no}{atime,dev,exec,relatime,suid,xattr} ro rw' \ '-v[report mount progress]' \ '-f[force mount]' \ - '(:)-a[mount all available ZFS filesystems]' \ + '(: -R)-a[mount all available ZFS filesystems]' \ '(-a):filesystem:_zfs_dataset -t fs' ;; @@ -888,6 +891,12 @@ case $service:$words[1] in ':property:($delegatable_perms $ro_ds_props ${rw_ds_props%%:*})' ;; + zpool:(clear|online)) + [[ $OSTYPE = linux* ]] && args=( + "--power[power on the device's slot in the storage enclosure]" + ) + ;| + zpool:help) _arguments -A "-*" -S \ - commands \ @@ -905,6 +914,7 @@ case $service:$words[1] in '-L[display real paths for vdevs resolving all symbolic links]' '-o+[set given pool properties]: :_values -s , "property" "${(@M)ci_po_props\:#ashift*}"' \ '-P[display real paths for vdevs instead of only the last component of the path]' + --allow-ashift-mismatch --allow-in-use --allow-replication-mismatch ) elif [[ $implementation = solaris ]]; then args=( '-l[display configuration in /dev/chassis location form]' ) @@ -1004,7 +1014,7 @@ case $service:$words[1] in zpool:get) [[ $implementation = solaris ]] && args=( - '-s+[specify sources to display]: :_values -s "source" local default none' + '-s+[specify sources to display]: :_values -s , "source" local default none' ) _arguments -A "-*" -S $args \ '-H[suppress headers and tab-delimit fields]' \ @@ -1140,6 +1150,9 @@ case $service:$words[1] in [[ $implementation = openzfs ]] && args=( '-f[force disk into faulted state]' ) + [[ $OSTYPE = linux* ]] && args=( + "--power[power off the device's slot in the storage enclosure]" + ) _arguments -C -A "-*" -S $args \ '-t[offline until next reboot]' \ ':pool:_zfs_pool' \ @@ -1147,7 +1160,7 @@ case $service:$words[1] in ;; zpool:online) - _arguments -C -A "-*" -S \ + _arguments -C -A "-*" -S $args \ '-e[expand device to use all available space]' \ ':pool:_zfs_pool' \ '*:virtual device:->pool-devices' @@ -1234,8 +1247,10 @@ case $service:$words[1] in zpool:status) if [[ $implementation = openzfs ]]; then args=( + '--power[display vdev enclosure slot power status]' '-D[display a histogram of deduplication statistics]' '-c[run scripts on each vdev]:script:_files -W "($ZPOOL_SCRIPTS_PATH /etc/zfs/zpool.d ~/.zpool.d)"' + '-e[only show unhealthy vdevs]' '-i[display vdev initialization status]' '-g[display vdev GUIDs instead of the normal device names]' '-L[display real paths for vdevs resolving all symbolic links]' -- cgit v1.2.3 From f3b865b9155269ba0dee7ced93b061e78df507c1 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 27 Jan 2025 23:06:16 +0100 Subject: 53326: completion updates for core Linux utils --- ChangeLog | 14 ++++++++++++++ Completion/Linux/Command/_findmnt | 14 ++++++++++---- Completion/Linux/Command/_free | 1 + Completion/Linux/Command/_losetup | 3 ++- Completion/Linux/Command/_lsblk | 7 ++++++- Completion/Linux/Command/_pidof | 1 + Completion/Linux/Command/_slabtop | 2 +- Completion/Linux/Command/_wipefs | 3 ++- Completion/Unix/Command/_awk | 1 + Completion/Unix/Command/_chmod | 14 +++++++------- Completion/Unix/Command/_chown | 3 +-- Completion/Unix/Command/_cmp | 2 +- Completion/Unix/Command/_find | 1 - Completion/Unix/Command/_hexdump | 1 + Completion/Unix/Command/_last | 1 + Completion/Unix/Command/_mv | 3 ++- Completion/Unix/Command/_objdump | 6 ++++-- Completion/Unix/Command/_pgrep | 1 + Completion/Unix/Command/_ping | 5 ++++- Completion/Unix/Command/_ps | 1 + Completion/Unix/Command/_readelf | 7 +++++-- Completion/Unix/Command/_strip | 1 + Completion/Unix/Command/_uptime | 7 ++++--- Completion/Unix/Command/_w | 1 + 24 files changed, 72 insertions(+), 28 deletions(-) (limited to 'Completion/Unix/Command/_mv') diff --git a/ChangeLog b/ChangeLog index 2585d50e8..c5db038e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2025-01-27 Oliver Kiddle + * 53326: Completion/Linux/Command/_findmnt, + Completion/Linux/Command/_free, Completion/Linux/Command/_losetup, + Completion/Linux/Command/_lsblk, Completion/Linux/Command/_pidof, + Completion/Linux/Command/_slabtop, Completion/Linux/Command/_wipefs, + Completion/Unix/Command/_awk, Completion/Unix/Command/_chmod, + Completion/Unix/Command/_chown, Completion/Unix/Command/_cmp, + Completion/Unix/Command/_find, Completion/Unix/Command/_hexdump, + Completion/Unix/Command/_last, Completion/Unix/Command/_mv, + Completion/Unix/Command/_objdump, Completion/Unix/Command/_pgrep, + Completion/Unix/Command/_ping, Completion/Unix/Command/_ps, + Completion/Unix/Command/_readelf, Completion/Unix/Command/_strip, + Completion/Unix/Command/_uptime, Completion/Unix/Command/_w: + completion updates for core Linux utils + * 53325: Completion/BSD/Command/_acpiconf, Completion/BSD/Command/_bsdconfig, Completion/BSD/Command/_pkgin, Completion/BSD/Command/_procstat, Completion/BSD/Command/_sockstat, diff --git a/Completion/Linux/Command/_findmnt b/Completion/Linux/Command/_findmnt index b29372c39..6155d4dc1 100644 --- a/Completion/Linux/Command/_findmnt +++ b/Completion/Linux/Command/_findmnt @@ -8,6 +8,7 @@ # local curcontext=$curcontext state state_descr line ret=1 typeset -A opt_args +local -a suf dedup _arguments -s -C \ '(H -A --all)'{-A,--all}'[print all filesystems]' \ @@ -45,6 +46,7 @@ _arguments -s -C \ '(H)2:: :->targets' \ + '(format)' \ '(H)'{-D,--df}'[imitate the output of df command]' \ + '(H)'{-I,--dfi}'[imitate the output of df with -i option]' \ '(H)'{-J,--json}'[use JSON output format]' \ '(H)'{-l,--list}'[use list output format]' \ '(H)'{-P,--pairs}'[use key="value" output format]' \ @@ -55,6 +57,7 @@ _arguments -s -C \ '(H)'{-N+,--task=}'[search /proc//mountinfo]: :_pids' \ '(H)'{-s,--fstab}'[search in /etc/fstab]' \ + '(H)' \ + '(* -)'{-H,--list-columns}'[list available columns]' \ '(- :)'{-h,--help}'[display help text and exit]' \ '(- :)'{-V,--version}'[display version and exit]' \ && ret=0 @@ -66,13 +69,16 @@ __findmnt_mountpoints () { case $state in columns) + dedup=( ${(Ms.,.)${PREFIX#+}##*,} ${(Ms.,.)SUFFIX%%,*} ) + suf=( -qS , ) + compset -S ',*' && suf=() compset -P '+' || _describe -t list-prefixes prefix \ - '( +:"not replace but extend the list" )' -S '' && ret=0 + '( +:"not replace but extend the list" )' -S '' && ret=0 + compset -P '*,' local -a columns=( - ${${${(f)"$(_call_program columns findmnt -h)"}[(r)Available*,-2]}[2,-1]} + ${${${${(f)"$(_call_program columns findmnt --list-columns)"}## #}//:/\\:}/ <[^>]#> #/:} ) - columns=( ${${${${${${columns## #}//:/\\:}//\[/\\[}//]/\\]}/ /[}/%/]} ) - _values -s , -M 'm:{a-z}={A-Z}' column $columns && ret=0 + _describe -t fields column columns -M 'm:{a-z}={A-Z}' $suf -F dedup && ret=0 ;; *) # call "findmnt $opts" to get possible sources/targets local opts='-lnve' diff --git a/Completion/Linux/Command/_free b/Completion/Linux/Command/_free index a0da97446..376b8a21f 100644 --- a/Completion/Linux/Command/_free +++ b/Completion/Linux/Command/_free @@ -2,6 +2,7 @@ _arguments -s \ '(-l --lohi)'{-l,--lohi}'[show detailed low and high memory statistics]' \ + '(-L --line)'{-L,--line}'[show output on a single line]' \ '(-t --total)'{-t,--total}'[show total for RAM + swap]' \ '(-v --committed)'{-v,--committed}'[show committed memory and commit limit]' \ '(-w --wide)'{-w,--wide}'[wide mode]' \ diff --git a/Completion/Linux/Command/_losetup b/Completion/Linux/Command/_losetup index f5a7ec1b1..d8e792aaf 100644 --- a/Completion/Linux/Command/_losetup +++ b/Completion/Linux/Command/_losetup @@ -18,7 +18,7 @@ _arguments -s -S \ - 'info' \ '(-v --verbose)'{-v,--verbose}'[verbose mode]' \ '(-o --offset -a --all)'{-a,--all}'[show the status of all loop devices]' \ - '(-O --output --output-all)'{-O+,--output=}'[specify columns to be printed with --list]:column:_sequence -s , compadd - name autoclear back-file back-ino back-maj\:min maj\:min offset partscan ro sizelimit dio log-sec' \ + '(-O --output --output-all)'{-O+,--output=}'[specify columns to be printed with --list]:column:_sequence -s , compadd -M "B\:+=" - name autoclear back-file back-ino back-maj\:min back-maj back-min maj\:min maj min offset partscan ref ro sizelimit dio log-sec' \ '(-O --output)--output-all[output all columns]' \ '(-J --json --raw -O --output -n --noheadings)'{-J,--json}'[use JSON --list output format]' \ '(-l --list)'{-l,--list}'[list currently used loop devices]' \ @@ -33,6 +33,7 @@ _arguments -s -S \ {-D,--detach-all}'[detach all associated loop devices]' \ - 'create' \ '--direct-io[open backing file with O_DIRECT]::enable:(on off)' \ + '--loop-ref=[specify loop device reference]:string' \ '(-f --find 1)'{-f,--find}'[find the first unused loop device]' \ '(-L --nooverlap)'{-L,--nooverlap}'[avoid possible conflict between devices]' \ '(-P --partscan)'{-P,--partscan}'[scan the partition table of newly created loop devices]' \ diff --git a/Completion/Linux/Command/_lsblk b/Completion/Linux/Command/_lsblk index 63aac743c..c8b30eb5e 100644 --- a/Completion/Linux/Command/_lsblk +++ b/Completion/Linux/Command/_lsblk @@ -8,6 +8,10 @@ typeset -A opt_args _arguments -C -s -S \ '(H -A --noempty)'{-A,--noempty}"[don't print empty devices]" \ '(H -E --dedup)'{-E+,--dedup=}'[de-duplicate output by specified column]:column:->columns' \ + '(H -Q --filter)'{-Q+,--filter=}'[only print lines matching expression]:expression' \ + '(H)--highlight=[color lines matching expression]:expression' \ + '(H)*--ct-filter=[restrict the next counter]:expression' \ + '(H)*--ct=[define a custom counter]:name\:param\:func' \ '(H -a --all)'{-a,--all}'[print all devices]' \ '(H -b --bytes)'{-b,--bytes}'[print size in bytes rather than in human readable format]' \ '(H -d --nodeps)'{-d,--nodeps}"[don't print slaves or holders]" \ @@ -40,6 +44,7 @@ _arguments -C -s -S \ '(H)'{-P,--pairs}'[use key="value" output format]' \ '(H)'{-r,--raw}'[use raw output format]' \ + 'H' \ + '(* -)'{-H,--list-columns}'[list the available columns]' \ '(* -)'{-h,--help}'[display help information]' \ '(* -)'{-V,--version}'[display version information]' && ret=0 @@ -56,7 +61,7 @@ case $state in ;| column*) values=( - ${${${${(f)"$(_call_program columns lsblk -h)"}[(r)Available*,-2]## #}[2,-1]//:/\\:}/ /:} + ${${${${(f)"$(_call_program columns lsblk --list-columns)"}## #}//:/\\:}/ <[^>]#> #/:} ) _describe -t fields column values -M 'm:{a-z}={A-Z}' $suf -F dedup && ret=0 ;; diff --git a/Completion/Linux/Command/_pidof b/Completion/Linux/Command/_pidof index 151a0e0f6..fdafd507d 100644 --- a/Completion/Linux/Command/_pidof +++ b/Completion/Linux/Command/_pidof @@ -17,6 +17,7 @@ case $variant in '(-w --with-workers)'{-w,--with-workers}'[show kernel workers too]' \ "(-x $exargs)"-x'[include shells running named scripts]' \ "($exargs)"\*{-o+,--omit-pid=}'[omit processes with PIDs]:pids:_sequence -s , _pids' \ + '(-t --lightweight)'{-t,--lightweight}'[list threads too]' \ '(-S --separator)'{-S+,--separator=}'[specify separator put between PIDs]:separator' \ '*:process:->procnames' \ && return 0 diff --git a/Completion/Linux/Command/_slabtop b/Completion/Linux/Command/_slabtop index 5c8919d12..2021ec332 100644 --- a/Completion/Linux/Command/_slabtop +++ b/Completion/Linux/Command/_slabtop @@ -1,5 +1,4 @@ #compdef slabtop -# based on procps-ng-3.3.15 local -a criteria=( 'a:number of active objects' @@ -18,5 +17,6 @@ _arguments -s \ '(-d --delay -o --once)'{-d+,--delay=}'[specify the delay between updates]:seconds: ' \ '(-s --sort)'{-s+,--sort=}'[specify the sort criteria]:criteria:(($criteria))' \ '(-d --delay -o --once)'{-o,--once}'[display the output once and exit]' \ + '--human[show human-readable output]' \ '(-)'{-V,--version}'[display version information and exit]' \ '(-)'{-h,--help}'[display usage information and exit]' diff --git a/Completion/Linux/Command/_wipefs b/Completion/Linux/Command/_wipefs index 8642aab92..5cc97e85f 100644 --- a/Completion/Linux/Command/_wipefs +++ b/Completion/Linux/Command/_wipefs @@ -2,7 +2,8 @@ _arguments -s -S \ '(H -a --all)'{-a,--all}'[wipe all magic strings]' \ - '(H -b --backup)'{-b,--backup}'[create a signature backup in $HOME]' \ + '(H --backup)-b[create a signature backup in $HOME]' \ + '(H -b)--backup=-[create a signature backup in $HOME]::path [$HOME]:_directories' \ '(H -f --force)'{-f,--force}'[force erasure]' \ '(H -i --no-headings -J --json -p --parsable)'{-i,--no-headings}"[don't print headings]" \ '(H -J --json -i --no-headings -p --parsable)'{-J,--json}'[use JSON output format]' \ diff --git a/Completion/Unix/Command/_awk b/Completion/Unix/Command/_awk index b69cc5cf8..694749d7d 100644 --- a/Completion/Unix/Command/_awk +++ b/Completion/Unix/Command/_awk @@ -51,6 +51,7 @@ case $variant in {-g,--gen-pot}'[scan awk program and generate .po file on stdout]' '*'{-i+,--include}'[load source library]:library file:->script' {-I,--trace}'[print internal byte code names as they are executed]' + '(-k --csv)'{-k,--csv}'[enable CSV special processing]' '*'{-l+,--load}'[load dynamic extension]:extension:->extension' {-M,--bignum}'[select arbitrary-precision arithmetic on numbers]' {-o-,--pretty-print=-}'[pretty-print awk program]::output file:_files' diff --git a/Completion/Unix/Command/_chmod b/Completion/Unix/Command/_chmod index 693f348dc..5ec60d707 100644 --- a/Completion/Unix/Command/_chmod +++ b/Completion/Unix/Command/_chmod @@ -19,6 +19,13 @@ case "$variant" in '*: :->files' ) ;; + gnu|freebsd*|openbsd*|netbsd*|darwin*|dragonfly*) + args+=( + '(-H -L -P)-L[follow all symlinks]' + '(-H -L -P)-H[follow symlinks on the command line]' + '(-H -L -P)-P[do not follow symlinks (default)]' + ) + ;| gnu) aopts=() args+=( @@ -49,13 +56,6 @@ case "$variant" in '-h[operate on symlinks themselves]' ) ;| - freebsd*|openbsd*|netbsd*|darwin*|dragonfly*) - args+=( - '(-H -L -P)-L[follow all symlinks]' - '(-H -L -P)-H[follow symlinks on the command line]' - '(-H -L -P)-P[do not follow symlinks (default)]' - ) - ;| darwin*) args+=( '(1)-C[return false if any specified files have ACLs]' diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown index bcc6aec2f..c9fe8fadd 100644 --- a/Completion/Unix/Command/_chown +++ b/Completion/Unix/Command/_chown @@ -13,6 +13,7 @@ case "$variant" in '(-h --no-dereference)--dereference[dereference symlinks]' '(-h --no-dereference --dereference)'{-h,--no-dereference}'[operate on symlinks themselves]' '(-f --silent --quiet)'{-f,--silent,--quiet}"[don't report errors]" + '--from=[restrict changes to files by current ownership]: :->owner' '--preserve-root[fail to operate recursively on /]' '--reference=[copy ownership of specified file]:file:_files' '(-R --recursive)'{-R,--recursive}'[change files and directories recursively]' @@ -22,8 +23,6 @@ case "$variant" in '(- : *)--help[display help information]' '(- : *)--version[display version information]' ) - [[ $service = chown ]] && - args+=( '--from=[restrict changes to files by current ownership]: :->owner' ) ;; *) args=( diff --git a/Completion/Unix/Command/_cmp b/Completion/Unix/Command/_cmp index 20d309e32..d0a4caa41 100644 --- a/Completion/Unix/Command/_cmp +++ b/Completion/Unix/Command/_cmp @@ -15,7 +15,7 @@ case $variant in units=":_numbers -u bytes offset K M G T P E Z Y" ;| gnu) - args=( + args+=( '(- *)'{-v,--version}'[display version information]' '(- *)--help[display help information]' ) diff --git a/Completion/Unix/Command/_find b/Completion/Unix/Command/_find index 4f1c338ee..95e4fac4e 100644 --- a/Completion/Unix/Command/_find +++ b/Completion/Unix/Command/_find @@ -109,7 +109,6 @@ case $variant in '-regextype:regexp syntax:(help findutils-default awk egrep ed emacs gnu-awk grep posix-awk posix-basic posix-egrep posix-extended posix-minimal-basic sed)' '*-warn' '*-nowarn' - '*-xautofs' '*-used:access after inode change (days)' '*-executable' '*-readable' diff --git a/Completion/Unix/Command/_hexdump b/Completion/Unix/Command/_hexdump index f700ca683..140422ac1 100644 --- a/Completion/Unix/Command/_hexdump +++ b/Completion/Unix/Command/_hexdump @@ -25,6 +25,7 @@ if [[ $OSTYPE = linux* ]]; then '(- *)'{-h,--help}'[display usage information]' '(- *)'{-V,--version}'[display version information]' ) + fmts+=( {--one-byte-hex,-X}'[one-byte hexadecimal display]' ) else # strip long options by taking every second element print -v fmts -f '%2$s' -- "$fmts[@]" diff --git a/Completion/Unix/Command/_last b/Completion/Unix/Command/_last index d76260c36..240b96e67 100644 --- a/Completion/Unix/Command/_last +++ b/Completion/Unix/Command/_last @@ -41,6 +41,7 @@ case $OSTYPE in '(-R --nohostname)'{-R,--nohostname}'[suppress display of hostname field]' '(-s --since)'{-s+,--since=}'[display lines since the specified time]:time (YYYYMMDDhhmmss)' '(-t --until)'{-t+,--until=}'[display lines until the specified time]:time (YYYYMMDDhhmmss)' + '(-T --tab-separated)'{-T,--tab-separated}'[use tabs as delimiters]' '(-p --present)'{-p+,--present=}'[display who were present at the specified time]:time (YYYYMMDDhhmmss)' '(-w --fullnames)'{-w,--fullnames}'[show full user and domain names]' '(-x --system)'{-x,--system}'[display shutdown/runlevel entries]' diff --git a/Completion/Unix/Command/_mv b/Completion/Unix/Command/_mv index 983c25ea8..e9227c334 100644 --- a/Completion/Unix/Command/_mv +++ b/Completion/Unix/Command/_mv @@ -14,6 +14,7 @@ case $variant; in {simple,never}"[always make simple backups]"' '(-b --backup -n --no-clobber)-b[make a backup of each existing destination file]' '(-v)--debug[explain how a file is copied]' + '--exchange[exchange source and destination]' '(-f --force -i --interactive -n --no-clobber)'{-f,--force}"[don't prompt before overwriting]" '(-f --force -i --interactive -n --no-clobber)'{-i,--interactive}'[prompt before overwriting existing file]' '(-f --force -i --interactive -n --no-clobber)'{-n,--no-clobber}"[don't overwrite existing file]" @@ -22,7 +23,7 @@ case $variant; in '(-S --suffix)'{-S+,--suffix=}'[specify the backup suffix]:backup suffix [~]' '(-t --target-directory)'{-t+,--target-directory=}'[move all source arguments into specified directory]:directory:_directories' '(-T --no-target-directory)'{-T,--no-target-directory}'[treat final argument as a normal file]' - '(-u)--update=-[move only when destination file is older or missing]::update files [older]:(all none older)' + '(-u)--update=-[move only when destination file is older or missing]::update files [older]:(all none none-fail older)' '(--update)-u[move only when destination file is older or missing]' '(-v --verbose)'{-v,--verbose}'[show file names after they are moved]' '(- *)--help[display usage information]' diff --git a/Completion/Unix/Command/_objdump b/Completion/Unix/Command/_objdump index 94c01eb83..71a615c97 100644 --- a/Completion/Unix/Command/_objdump +++ b/Completion/Unix/Command/_objdump @@ -32,6 +32,7 @@ case $variant in '(-D --disassemble-all)'{-D,--disassemble-all}'[display assembler contents of all sections]' '(-S --source)'{-S,--source}'[intermix source code with disassembly]' '--source-comment=-[prefix lines of source code with specified text]::text prefix [# ]' + '(-Z --decompress)'{-Z,--decompress}'[decompress section(s) before displaying their contents]' '(-g --debugging)'{-g,--debugging}'[display debug information in object file]' '(-e --debugging-tags)'{-e,--debugging-tags}'[display debug information using ctags style]' '(-G --stabs)'{-G,--stabs}'[display (in raw form) any STABS info in the file]' @@ -176,13 +177,14 @@ case "$state" in 'O[str-offsets]' \ "o[loc]" "R[ranges]" "t[pubtypes]" "U[trace_info]" "u[trace_abbrev]" \ "T[trace_aranges]" "g[gdb_index]" "A[addr]" "c[cu_index]" "k[links]" \ - "K[follow-links]" && ret=0 + "K[follow-links]" "D[use-debuginfod]" "E[do-not-use-debuginfod]" && ret=0 ;; dwarf-names) _sequence _wanted dwarf-sections expl "dwarf section" compadd - \ rawline decodedline info abbrev pubnames aranges macro frames \ frames-interp str str-offsets loc Ranges pubtypes gdb_index trace_info \ - trace_abbrev trace_aranges addr cu_index links follow-links && ret=0 + trace_abbrev trace_aranges addr cu_index links follow-links \ + use-debuginfod do-not-use-debuginfod && ret=0 ;; bfdnames) _wanted targets expl target compadd - \ diff --git a/Completion/Unix/Command/_pgrep b/Completion/Unix/Command/_pgrep index 94c1dae1a..798b6d6d4 100644 --- a/Completion/Unix/Command/_pgrep +++ b/Completion/Unix/Command/_pgrep @@ -48,6 +48,7 @@ arguments=( '--cgroup=[match by cgroup v2 names]:cgroup' '--ns=[match only on same namespaces as specified PID]: :_pids' '--nslist=[match only on specified namespaces (with --ns)]:namespace:(ipc mnt net pid user uts)' + '*--env=[match on environment variable]:var[=value]:_parameters -g "*export*" -qS=' '(: * -)'{-V,--version}'[display version information]' '-z+[match only on specified zone IDs]:zone:_sequence _zones' ) diff --git a/Completion/Unix/Command/_ping b/Completion/Unix/Command/_ping index 84bd76b82..95e1fd604 100644 --- a/Completion/Unix/Command/_ping +++ b/Completion/Unix/Command/_ping @@ -196,6 +196,7 @@ case ${variant}:${${service#ping}:-4} in ;; iputils:*) args+=( + '-3[RTT precision (do not round up the result time)]' '-A[adaptive]' '-b[allow pinging a broadcast address]' "-B[don't allow ping to change source address]" @@ -204,12 +205,14 @@ case ${variant}:${${service#ping}:-4} in '-e+[define identifier for ping session]:identifier' '(-4)-F+[allocate and set 20-bit flow label]:flow label (hex)' '(-)-h[show usage information]' + '(-n)-H[force reverse DNS name resolution even for numeric destination]' '-I+[specify source interface]:interface:_net_interfaces' '-m+[specify mark to tag outgoing packets]:mark' "-M+[specify path MTU discovery strategy]:strategy:(( do\:prohibit\ fragmentation,\ even\ local\ one want\:do\ PMTU\ discovery - dont\:don\'t\ set\ DF\ flag))" + dont\:don\'t\ set\ DF\ flag + probe\:set\ DF\ flag\ and\ bypass\ PMTU\ checks))" '(-4)-N+[send ICMPv6 node information queries instead of echo request]:sub option' '-O[report outstanding ICMP ECHO reply before sending next packet]' '-Q+[set Quality of Service-related bits in ICMP datagrams]:QoS TOS bits' diff --git a/Completion/Unix/Command/_ps b/Completion/Unix/Command/_ps index 158fb6b83..7d83f90ea 100644 --- a/Completion/Unix/Command/_ps +++ b/Completion/Unix/Command/_ps @@ -172,6 +172,7 @@ case $OSTYPE in '--headers[repeat header lines, one per page of output]' '(--cols --columns --width)'{--cols,--columns,--width}'[set screen width]:width' '(--lines --rows)'{--lines,--rows}'[set screen height]' + '--signames[display signal masks using signal names]' '--cumulative[include child process data with the parent]' '-n[set namelist file for WCHAN display]:file:_files' '(--no-headers --no-heading)'{--no-headers,--no-heading}'[suppress headers]' diff --git a/Completion/Unix/Command/_readelf b/Completion/Unix/Command/_readelf index b3abdf0a5..43cbc81c6 100644 --- a/Completion/Unix/Command/_readelf +++ b/Completion/Unix/Command/_readelf @@ -19,8 +19,8 @@ args=( '(-D --use-dynamic)'{-D,--use-dynamic}'[use dynamic section info when showing symbols]' \*{-x,--hex-dump=}"[dump contents of specified section as bytes]:section:($sections)" \*{-p,--string-dump=}"[dump contents of specified section as strings]:section:($sections)" - '-w+[show the contents of DWARF2 debug sections]::debug section:(a A r c L f F g i o m p t R l s O u T U k K N)' - '--debug-dump=[show the contents of DWARF2 debug sections]::section:(abbrev addr aranges cu_index decodedline frames frames-interp gdb_index info loc macro pubnames pubtypes Ranges rawline str str-offsets trace_abbrev trace_aranges trace_info links follow-links no-follow-links)' + '*-w+[show the contents of DWARF2 debug sections]::debug section:(a A r c f F g i k K N D E l L m o O p r R s t T u U)' + '*--debug-dump=[show the contents of DWARF2 debug sections]::section:(abbrev addr cu_index frames frames-interp gdb_index info links follow-links no-follow-links use-debuginfod do-not-use-debuginfod rawline decodedline macro loc str-offsets pubnames aranges Ranges str pubtype trace_aranges trace_abbrev trace_info)' '(-P --process-links)'{-P,--process-links}'[display the contents of non-debug sections in separate debuginfo files]' '(-I --histogram)'{-I,--histogram}'[show histogram of bucket list lengths]' '(-W --wide)'{-W,--wide}'[allow output width to exceed 80 characters]' @@ -59,8 +59,11 @@ case $variant in '--no-recurse-limit[disable demangling recursion limit]' '-U+[specify how to display unicode characters]:method:(d l e x h i)' '--unicode=[specify how to display unicode characters]:method:(default locale escape hex highlight invalid)' + '(-X --extra-sym-info)'{-X,--extra-sym-info}'[display extra information when showing symbols]' + '!(-X --extra-sym-info)--no-extra-sym-info' '(-L --lint --enable-checks)'{-L,--lint,--enable-checks}'[display warning messages for possible problems]' \*{-R,--relocated-dump=}"[dump contents of specified section as relocated bytes]:section:($sections)" + \*{-j,--display-section=}'[display contents of specified section]:section' "--dwarf-depth=[don't show DIEs at greater than specified depth]:depth" '--dwarf-start=[show DIEs starting at specified depth or deeper]:depth' '--ctf=[display compact C type format info from section]:section' diff --git a/Completion/Unix/Command/_strip b/Completion/Unix/Command/_strip index cc67ae49a..59cb537b9 100644 --- a/Completion/Unix/Command/_strip +++ b/Completion/Unix/Command/_strip @@ -41,6 +41,7 @@ if _pick_variant -r variant gnu=GNU elftoolchain=elftoolchain $OSTYPE --version; '(-D --enable-deterministic-archives -U --disable-deterministic-archives)'{-U,--disable-deterministic-archives}'[disable -D behavior]' '(-D --enable-deterministic-archives -U --disable-deterministic-archives)'{-D,--enable-deterministic-archives}'[produce deterministic output when stripping archives (zero file metadata)]' '--remove-relocations=[remove relocations from specified section]:section' + '--strip-section-headers[strip section headers from the output]' '--strip-dwo[remove all DWARF .dwo sections]' '!(--no-merge-notes)'{-M,--merge-notes} "--no-merge-notes[don't attempt to remove redundant notes]" diff --git a/Completion/Unix/Command/_uptime b/Completion/Unix/Command/_uptime index 58b4d991b..64d2e15fe 100644 --- a/Completion/Unix/Command/_uptime +++ b/Completion/Unix/Command/_uptime @@ -9,9 +9,10 @@ case $variant in _arguments -s -S : \ '(: -)'{-h,--help}'[display help information]' \ '(: -)'{-V,--version}'[display version information]' \ - + '(excl)' \ - {-p,--pretty}'[display uptime in pretty format]' \ - {-s,--since}'[display date/time of system boot]' + '(-c --container)'{-c,--container}'[show container uptime]' \ + '(-p --pretty -s --since -r --raw)'{-p,--pretty}'[display uptime in pretty format]' \ + '(-r --raw -p --pretty)'{-r,--raw}'[uptime values in raw format]' \ + '(-s --since -p --pretty)'{-s,--since}'[display date/time of system boot]' return ;; gnu) diff --git a/Completion/Unix/Command/_w b/Completion/Unix/Command/_w index 408cb76af..2da57a8f6 100644 --- a/Completion/Unix/Command/_w +++ b/Completion/Unix/Command/_w @@ -6,6 +6,7 @@ case $OSTYPE in linux*) args=( '(H -f --from)'{-f,--from}'[toggle display of remote hostname]' + '(-c --container)'{-c,--container}'[show container uptime]' '(H -h)--no-header[suppress the heading]' '(H -i --ip-addr)'{-i,--ip-addr}'[display IP address instead of hostname]' '(H -o --old-style -s --short)'{-o,--old-style}'[old style output format]' -- cgit v1.2.3