aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2013-07-04 18:11:27 +0530
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-10-09 11:11:55 -0300
commit7b6c48e16e5d312b0ebae78acfb3ff4f9c8c083c (patch)
tree0c949fedd6487478dae705ee7ea361f52cbcbdde /tools
parent30079d1d5ebcb8d706c6e05cacebb7facc60cd95 (diff)
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 <artagnon@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/1372941691-14684-4-git-send-email-artagnon@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/bash_completion7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/bash_completion b/tools/perf/bash_completion
index b0cdd12bd5e..d2598be517f 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