From: Ramkumar Ramachandra Date: Thu, 4 Jul 2013 12:41:27 +0000 (+0530) Subject: perf completion: Strip dependency on _filedir X-Git-Tag: accepted/tizen/common/20141203.182822~1185^2~28^2~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b6c48e16e5d312b0ebae78acfb3ff4f9c8c083c;p=platform%2Fkernel%2Flinux-arm64.git perf completion: Strip dependency on _filedir _filedir is defined in the bash-completion package, but there is no need to depend on it. Instead, call complete with multiple -o arguments before the -F argument like in git.git's completion script. Signed-off-by: Ramkumar Ramachandra Cc: Frederic Weisbecker Link: http://lkml.kernel.org/r/1372941691-14684-4-git-send-email-artagnon@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/bash_completion b/tools/perf/bash_completion index b0cdd12..d2598be 100644 --- a/tools/perf/bash_completion +++ b/tools/perf/bash_completion @@ -54,9 +54,8 @@ _perf() subcmd=${COMP_WORDS[1]} opts=$($cmd $subcmd --list-opts) COMPREPLY=( $( compgen -W '$opts' -- "$cur" ) ) - # Fall down to list regular files - else - _filedir fi } && -complete -F _perf perf + +complete -o bashdefault -o default -o nospace -F _perf perf 2>/dev/null \ + || complete -o default -o nospace -F _perf perf