btrfs-progs: cleanup whitespaces of btrfs-completion
Clean up spaces and use only tabs. No functional change. Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
0766330f85
commit
629688a2d2
188
btrfs-completion
188
btrfs-completion
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
_btrfs_devs()
|
_btrfs_devs()
|
||||||
{
|
{
|
||||||
local DEVS
|
local DEVS
|
||||||
DEVS=''; while read dev; do DEVS+="$dev "; done < <(lsblk -pnro name)
|
DEVS=''; while read dev; do DEVS+="$dev "; done < <(lsblk -pnro name)
|
||||||
COMPREPLY+=( $( compgen -W "$DEVS" -- "$cur" ) )
|
COMPREPLY+=( $( compgen -W "$DEVS" -- "$cur" ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,92 +23,92 @@ _btrfs_mnts()
|
||||||
_btrfs()
|
_btrfs()
|
||||||
{
|
{
|
||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
|
|
||||||
local cmd=${words[1]}
|
local cmd=${words[1]}
|
||||||
|
|
||||||
commands='subvolume filesystem balance device scrub check rescue restore inspect-internal property send receive quota qgroup replace help version'
|
commands='subvolume filesystem balance device scrub check rescue restore inspect-internal property send receive quota qgroup replace help version'
|
||||||
commands_subvolume='create delete list snapshot find-new get-default set-default show sync'
|
commands_subvolume='create delete list snapshot find-new get-default set-default show sync'
|
||||||
commands_filesystem='defragment sync resize show df du label usage'
|
commands_filesystem='defragment sync resize show df du label usage'
|
||||||
commands_balance='start pause cancel resume status'
|
commands_balance='start pause cancel resume status'
|
||||||
commands_device='scan add delete remove ready stats usage'
|
commands_device='scan add delete remove ready stats usage'
|
||||||
commands_scrub='start cancel resume status'
|
commands_scrub='start cancel resume status'
|
||||||
commands_rescue='chunk-recover super-recover zero-log'
|
commands_rescue='chunk-recover super-recover zero-log'
|
||||||
commands_inspect_internal='inode-resolve logical-resolve subvolid-resolve rootid min-dev-size dump-tree dump-super tree-stats'
|
commands_inspect_internal='inode-resolve logical-resolve subvolid-resolve rootid min-dev-size dump-tree dump-super tree-stats'
|
||||||
commands_property='get set list'
|
commands_property='get set list'
|
||||||
commands_quota='enable disable rescan'
|
commands_quota='enable disable rescan'
|
||||||
commands_qgroup='assign remove create destroy show limit'
|
commands_qgroup='assign remove create destroy show limit'
|
||||||
commands_replace='start status cancel'
|
commands_replace='start status cancel'
|
||||||
|
|
||||||
if [[ "$cur" == -* && $cword -le 3 && "$cmd" != "help" ]]; then
|
if [[ "$cur" == -* && $cword -le 3 && "$cmd" != "help" ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--help' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '--help' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $cword -eq 1 ]]; then
|
if [[ $cword -eq 1 ]]; then
|
||||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
elif [[ $cword -eq 2 ]]; then
|
elif [[ $cword -eq 2 ]]; then
|
||||||
case $cmd in
|
case $cmd in
|
||||||
subvolume)
|
subvolume)
|
||||||
opts="$commands_subvolume"
|
opts="$commands_subvolume"
|
||||||
;;
|
;;
|
||||||
filesystem)
|
filesystem)
|
||||||
opts="$commands_filesystem"
|
opts="$commands_filesystem"
|
||||||
;;
|
;;
|
||||||
balance)
|
balance)
|
||||||
opts="$commands_balance"
|
opts="$commands_balance"
|
||||||
;;
|
;;
|
||||||
device)
|
device)
|
||||||
opts="$commands_device"
|
opts="$commands_device"
|
||||||
;;
|
;;
|
||||||
scrub)
|
scrub)
|
||||||
opts="$commands_scrub"
|
opts="$commands_scrub"
|
||||||
;;
|
;;
|
||||||
check)
|
check)
|
||||||
_btrfs_devs
|
_btrfs_devs
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
rescue)
|
rescue)
|
||||||
opts="$commands_rescue"
|
opts="$commands_rescue"
|
||||||
;;
|
;;
|
||||||
restore)
|
restore)
|
||||||
_btrfs_devs
|
_btrfs_devs
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
inspect-internal)
|
inspect-internal)
|
||||||
opts="$commands_inspect_internal"
|
opts="$commands_inspect_internal"
|
||||||
;;
|
;;
|
||||||
property)
|
property)
|
||||||
opts="$commands_property"
|
opts="$commands_property"
|
||||||
;;
|
;;
|
||||||
send|receive)
|
send|receive)
|
||||||
_filedir -d
|
_filedir -d
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
quota)
|
quota)
|
||||||
opts="$commands_quota"
|
opts="$commands_quota"
|
||||||
;;
|
;;
|
||||||
qgroup)
|
qgroup)
|
||||||
opts="$commands_qgroup"
|
opts="$commands_qgroup"
|
||||||
;;
|
;;
|
||||||
replace)
|
replace)
|
||||||
opts="$commands_replace"
|
opts="$commands_replace"
|
||||||
;;
|
;;
|
||||||
help)
|
help)
|
||||||
opts="--full"
|
opts="--full"
|
||||||
;;
|
;;
|
||||||
version)
|
version)
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
elif [[ $cword -eq 3 ]]; then
|
elif [[ $cword -eq 3 ]]; then
|
||||||
case $cmd in
|
case $cmd in
|
||||||
filesystem)
|
filesystem)
|
||||||
case $prev in
|
case $prev in
|
||||||
defragment)
|
defragment)
|
||||||
_filedir
|
_filedir
|
||||||
|
@ -124,11 +124,11 @@ _btrfs()
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
device|rescue)
|
device|rescue)
|
||||||
_btrfs_devs
|
_btrfs_devs
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
inspect-internal)
|
inspect-internal)
|
||||||
case $prev in
|
case $prev in
|
||||||
min-dev-size)
|
min-dev-size)
|
||||||
|
@ -149,18 +149,18 @@ _btrfs()
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
replace)
|
replace)
|
||||||
case $prev in
|
case $prev in
|
||||||
status|cancel)
|
status|cancel)
|
||||||
_btrfs_mnts
|
_btrfs_mnts
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
start)
|
start)
|
||||||
_btrfs_devs
|
_btrfs_devs
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
subvolume)
|
subvolume)
|
||||||
case $prev in
|
case $prev in
|
||||||
list)
|
list)
|
||||||
|
@ -169,11 +169,11 @@ _btrfs()
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_filedir -d
|
_filedir -d
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -F _btrfs btrfs
|
complete -F _btrfs btrfs
|
||||||
|
|
Loading…
Reference in New Issue