diff options
Diffstat (limited to 'Completion/Linux/Command')
-rw-r--r-- | Completion/Linux/Command/_findmnt | 14 | ||||
-rw-r--r-- | Completion/Linux/Command/_free | 1 | ||||
-rw-r--r-- | Completion/Linux/Command/_losetup | 3 | ||||
-rw-r--r-- | Completion/Linux/Command/_lsblk | 7 | ||||
-rw-r--r-- | Completion/Linux/Command/_pidof | 1 | ||||
-rw-r--r-- | Completion/Linux/Command/_slabtop | 2 | ||||
-rw-r--r-- | Completion/Linux/Command/_wipefs | 3 |
7 files changed, 23 insertions, 8 deletions
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/<pid>/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]' \ |