>From ca3299156e5393aad8346065389d4d5aa4b873e9 Mon Sep 17 00:00:00 2001 From: Frank Dittrich Date: Mon, 11 Jun 2012 13:52:24 +0200 Subject: [PATCH] bash completion: avoid default completion for --opt= --- run/john.bash_completion | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/run/john.bash_completion b/run/john.bash_completion index ccc7387..bc3b0dc 100644 --- a/run/john.bash_completion +++ b/run/john.bash_completion @@ -550,12 +550,12 @@ _john() return 0 ;; *) + compopt -o bashdefault -o default return 0 ;; esac } && -complete -o bashdefault -o default -F _john john - +complete -F _john john # unique ## have grep && have sed && _unique() @@ -575,6 +575,8 @@ _unique() # if [[ "_${usage}" != "_OUTPUT-FILE" ]] ; then # COMPREPLY=( $(compgen -W "${usage}" -- "") ) # _filedir +# else +# compopt -o bashdefault -o default # fi # return 0 # ;; @@ -589,6 +591,10 @@ _unique() fi return 0 ;; + _-*=) + compopt -o bashdefault -o default + return 0 + ;; _-*) if [[ "_${usage}_" != "_OUTPUT-FILE_" ]] ; then options=`echo ${usage}|sed 's# #\n#g'|grep '^\[.*\]$'|sed 's#^.\(.*\).$#\1#'|sed 's#=.*$#=#'` @@ -605,8 +611,9 @@ _unique() return 0 ;; _*) + compopt -o bashdefault -o default return 0 ;; esac } && -complete -o bashdefault -o default -F _unique unique +complete -F _unique unique -- 1.7.7.6