Use compgen -W in mock root completions.
This commit is contained in:
parent
696ee59f7e
commit
8270b9cf81
@ -32,8 +32,9 @@ _mock()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-r|--root)
|
-r|--root)
|
||||||
COMPREPLY=( $( command ls $cfgdir | \
|
COMPREPLY=( $( compgen -W "$( command ls $cfgdir )" \
|
||||||
sed -ne 's/^\('$cur'.*\)\.cfg$/\1/p') )
|
-- $cur ) )
|
||||||
|
COMPREPLY=( ${COMPREPLY[@]/%.cfg/} )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--@(config|result)dir)
|
--@(config|result)dir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user