>From 6bc5053b0fb101366d3355a8b9b111123ae173cf Mon Sep 17 00:00:00 2001 From: Frank Dittrich Date: Mon, 11 Jun 2012 08:06:06 +0200 Subject: [PATCH] Fix bash completion for unique --- run/john.bash_completion | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/run/john.bash_completion b/run/john.bash_completion index 363a5e3..028cf1a 100644 --- a/run/john.bash_completion +++ b/run/john.bash_completion @@ -558,19 +558,22 @@ _unique() first="${COMP_WORDS[0]}" usage=`${first}|grep '^Usage:'|sed 's#^Usage:\? \?[^ ]*unique *##'` case "_${cur}" in - _|_${first}) - if [[ "_${usage}" != "_OUTPUT-FILE" ]] ; then - COMPREPLY=( $(compgen -W "${usage}" -- "") ) - fi - return 0 - ;; +# _|_${first}) +# if [[ "_${usage}" != "_OUTPUT-FILE" ]] ; then +# COMPREPLY=( $(compgen -W "${usage}" -- "") ) +# _filedir +# fi +# return 0 +# ;; _-cut=*|_-mem=*) return 0 ;; _-inp=*|_-ex_file=*|_-ex_file_only=*) - cur=${cur#*=} - __expand_tilde_by_ref cur 2>/dev/null - _filedir + if [[ "_${usage}" != "_OUTPUT-FILE" ]] ; then + cur=${cur#*=} + __expand_tilde_by_ref cur 2>/dev/null + _filedir + fi return 0 ;; _-*) @@ -589,6 +592,7 @@ _unique() return 0 ;; _*) + _filedir return 0 ;; esac -- 1.7.7.6