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