Only complete device files (and directories)
+ Some cleanup
This commit is contained in:
parent
db301d4b32
commit
1ecc42490e
10
src/_lsblk
10
src/_lsblk
|
@ -1,11 +1,8 @@
|
||||||
#compdef lsblk
|
#compdef lsblk
|
||||||
|
|
||||||
# zsh completions for 'lsblk'
|
|
||||||
# automatically generated with http://github.com/RobSis/zsh-completion-generator
|
|
||||||
local arguments
|
local arguments
|
||||||
|
|
||||||
|
local lsblk_cols_all=(
|
||||||
local LSBLK_COLS_ALL=(
|
|
||||||
NAME KNAME MAJ:MIN FSTYPE MOUNTPOINT
|
NAME KNAME MAJ:MIN FSTYPE MOUNTPOINT
|
||||||
LABEL UUID PARTTYPE PARTLABEL PARTUUID PARTFLAGS
|
LABEL UUID PARTTYPE PARTLABEL PARTUUID PARTFLAGS
|
||||||
RA RO RM
|
RA RO RM
|
||||||
|
@ -16,10 +13,9 @@ local LSBLK_COLS_ALL=(
|
||||||
RAND PKNAME HCTL TRAN REV VENDOR)
|
RAND PKNAME HCTL TRAN REV VENDOR)
|
||||||
|
|
||||||
_lsblk_columns() {
|
_lsblk_columns() {
|
||||||
compadd $@ $LSBLK_COLS_ALL
|
compadd $@ $lsblk_cols_all
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
arguments=(
|
arguments=(
|
||||||
'(-a --all)'{-a,--all}'[print all devices]'
|
'(-a --all)'{-a,--all}'[print all devices]'
|
||||||
'(-b --bytes)'{-b,--bytes}'[print size in bytes rather than in human readable format]'
|
'(-b --bytes)'{-b,--bytes}'[print size in bytes rather than in human readable format]'
|
||||||
|
@ -44,7 +40,7 @@ arguments=(
|
||||||
'(-x --sort)'{-x,--sort}'=[sort output by specified column]:Sort column:_lsblk_columns'
|
'(-x --sort)'{-x,--sort}'=[sort output by specified column]:Sort column:_lsblk_columns'
|
||||||
'(-h --help)'{-h,--help}'[display this help and exit]'
|
'(-h --help)'{-h,--help}'[display this help and exit]'
|
||||||
'(-V --version)'{-V,--version}'[output version information and exit]'
|
'(-V --version)'{-V,--version}'[output version information and exit]'
|
||||||
'*:filename:_files'
|
'*:device:_path_files -g "*(N-%) *(N-/)"'
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments -s $arguments
|
_arguments -s $arguments
|
||||||
|
|
Loading…
Reference in New Issue