The following commit has been merged in the master branch:
commit 8270b9cf81f3931051518d13f46d7ee6c87969eb
Author: Ville Skyttä <[email protected]>
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=( ${comprep...@]/%.cfg/} )
return 0
;;
--@(config|result)dir)
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits