mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Only complete device files (and directories)
+ Some cleanup
This commit is contained in:
+3
-7
@@ -1,11 +1,8 @@
|
||||
#compdef lsblk
|
||||
|
||||
# zsh completions for 'lsblk'
|
||||
# automatically generated with http://github.com/RobSis/zsh-completion-generator
|
||||
local arguments
|
||||
|
||||
|
||||
local LSBLK_COLS_ALL=(
|
||||
local lsblk_cols_all=(
|
||||
NAME KNAME MAJ:MIN FSTYPE MOUNTPOINT
|
||||
LABEL UUID PARTTYPE PARTLABEL PARTUUID PARTFLAGS
|
||||
RA RO RM
|
||||
@@ -16,10 +13,9 @@ local LSBLK_COLS_ALL=(
|
||||
RAND PKNAME HCTL TRAN REV VENDOR)
|
||||
|
||||
_lsblk_columns() {
|
||||
compadd $@ $LSBLK_COLS_ALL
|
||||
compadd $@ $lsblk_cols_all
|
||||
}
|
||||
|
||||
|
||||
arguments=(
|
||||
'(-a --all)'{-a,--all}'[print all devices]'
|
||||
'(-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'
|
||||
'(-h --help)'{-h,--help}'[display this help and exit]'
|
||||
'(-V --version)'{-V,--version}'[output version information and exit]'
|
||||
'*:filename:_files'
|
||||
'*:device:_path_files -g "*(N-%) *(N-/)"'
|
||||
)
|
||||
|
||||
_arguments -s $arguments
|
||||
|
||||
Reference in New Issue
Block a user