projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30079d1
)
perf completion: Strip dependency on _filedir
author
Ramkumar Ramachandra
<
[email protected]
>
Thu, 4 Jul 2013 12:41:27 +0000
(18:11 +0530)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Wed, 9 Oct 2013 14:11:55 +0000
(11:11 -0300)
_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 <
[email protected]
>
Cc: Frederic Weisbecker <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/bash_completion
patch
|
blob
|
history
diff --git
a/tools/perf/bash_completion
b/tools/perf/bash_completion
index b0cdd12bd5e48326ffdf06eb3a62c545cc32d24a..d2598be517fb2acdbb73b98f7a3cc43c5bfe09f2 100644
(file)
--- 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