lrzip: Add -? and -p argument (non-)completions.
This commit is contained in:
parent
2f90dc7ecf
commit
8535fdc9bf
@ -10,7 +10,7 @@ _lrzip()
|
|||||||
local xspec="*.lrz"
|
local xspec="*.lrz"
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-w|-S|-V|-h)
|
-w|-S|-V|-h|-'?')
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-d)
|
-d)
|
||||||
@ -36,6 +36,13 @@ _lrzip()
|
|||||||
COMPREPLY=( $( compgen -W '{-20..19}' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '{-20..19}' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
-p)
|
||||||
|
local var=NPROCESSORS_ONLN
|
||||||
|
[[ $OSTYPE == *linux* ]] && var=_$var
|
||||||
|
local n=$( getconf $var 2>/dev/null )
|
||||||
|
COMPREPLY=( $( compgen -W "{1..${n:-1}}" -- "$cur" ) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
_expand || return 0
|
_expand || return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user