[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 8270b9cf81f3931051518d13f46d7ee6c87969eb
Ville Skyttä
ville.skytta at iki.fi
Mon Jun 8 21:20:16 UTC 2009
The following commit has been merged in the master branch:
commit 8270b9cf81f3931051518d13f46d7ee6c87969eb
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Tue Jun 9 00:19:58 2009 +0300
Use compgen -W in mock root completions.
diff --git a/contrib/mock b/contrib/mock
index 933d531..f7fc7bc 100644
--- a/contrib/mock
+++ b/contrib/mock
@@ -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)
--
bash-completion
More information about the Bash-completion-commits
mailing list