Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 4/5] bashcompinit: simplify result matching code



Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 Completion/bashcompinit |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/Completion/bashcompinit b/Completion/bashcompinit
index 4b2084a..9c561c5 100644
--- a/Completion/bashcompinit
+++ b/Completion/bashcompinit
@@ -151,8 +151,7 @@ compgen() {
   
   # support for the last, `word' option to compgen. Zsh's matching does a
   # better job but if you need to, comment this in and use compadd -U
-  #shift $(( OPTIND - 1 ))
-  #(( $# )) && results=( "${(M)results[@]:#$1*}" )
+  # (( $# >= OPTIND)) && results=( "${(M)results[@]:#${@[-1]}*}" )
 
   print -l -r -- "$prefix${^results[@]}$suffix"
 }
-- 
1.7.8.3



Messages sorted by: Reverse Date, Date, Thread, Author