bash-completion: fsck.cramfs, isosize: find files an argument
Earlier completion suggested only options for the command, this changes options to be proposed when first character of an argument is dash. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
aeb9298d3e
commit
5f57e1420c
|
@ -15,8 +15,15 @@ _fsck.cramfs_module()
|
|||
return 0
|
||||
;;
|
||||
esac
|
||||
OPTS='--verbose --destination --help --version file'
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -S ' ' -- $cur) )
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $(compgen -W "--verbose --blocksize --extract --help --version" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _fsck.cramfs_module fsck.cramfs
|
||||
|
|
|
@ -13,8 +13,15 @@ _isosize_module()
|
|||
return 0
|
||||
;;
|
||||
esac
|
||||
OPTS='--divisor --sectors --help --version'
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $(compgen -W "--divisor --sectors --help --version" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _isosize_module isosize
|
||||
|
|
Loading…
Reference in New Issue