aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/bash_completion
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/bash_completion')
-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