The following commit has been merged in the master branch:
commit 457dbf6061eea5f2d1e3bccacf1691265f7321cc
Author: Ville Skyttä <[email protected]>
Date: Mon May 2 13:51:55 2011 +0300
_init_completion: Indicate that completion should not continue if cword ==
0.
http://thread.gmane.org/gmane.comp.shells.bash.bugs/16499
http://lists.alioth.debian.org/pipermail/bash-completion-devel/2011-May/003635.html
Thanks-to: Igor Murzov <[email protected]>
diff --git a/bash_completion b/bash_completion
index 77e76b3..e88e2fc 100644
--- a/bash_completion
+++ b/bash_completion
@@ -740,7 +740,9 @@ _init_completion()
i=$(( ++i ))
fi
done
- [[ $cword -ge 1 ]] && prev=${words[cword-1]} || prev=
+
+ [[ $cword -eq 0 ]] && return 1
+ prev=${words[cword-1]}
[[ $split ]] && _split_longopt && split=true
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits