[ditz-talk] [PATCH] fix completion bug on strings like '-n'
Christian Garbs
mitch at cgarbs.de
Sat Aug 9 09:20:40 EDT 2008
This fixes a bug in the bash completion that can be triggered by entering
something like "ditz -n" and pressing tab.
Regards,
Christian
---
contrib/completion/ditz.bash | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/contrib/completion/ditz.bash b/contrib/completion/ditz.bash
index e2c6dc1..4f43e21 100644
--- a/contrib/completion/ditz.bash
+++ b/contrib/completion/ditz.bash
@@ -8,14 +8,14 @@ _ditz()
{
cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ]; then
- COMPREPLY=( $( compgen -W "$(ditz --commands)" $cur ) )
+ COMPREPLY=( $( compgen -W "$(ditz --commands)" -- $cur ) )
elif [ $COMP_CWORD -eq 2 ]; then
cmd=${COMP_WORDS[1]}
- COMPREPLY=( $( compgen -W "$(ditz "$cmd" '<options>' 2>/dev/null)" $cur ) )
+ COMPREPLY=( $( compgen -W "$(ditz "$cmd" '<options>' 2>/dev/null)" -- $cur ) )
elif [ $COMP_CWORD -eq 3 ]; then
cmd=${COMP_WORDS[1]}
parm1=${COMP_WORDS[2]}
- COMPREPLY=( $( compgen -W "$(ditz "$cmd" "$parm1" '<options>' 2>/dev/null)" $cur ) )
+ COMPREPLY=( $( compgen -W "$(ditz "$cmd" "$parm1" '<options>' 2>/dev/null)" -- $cur ) )
fi
}
--
1.5.6.3
More information about the ditz-talk
mailing list