diff options
author | Peter Xu <peterx@redhat.com> | 2016-03-17 09:19:27 +0800 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-03-21 16:04:57 -0400 |
commit | 8bbbaaaf78ecd479d149fc84ab7d50be90c3540d (patch) | |
tree | d4098f22f8830a14dc549cb3fcd17229ab3cb251 | |
parent | 797db1e341ce7d85a41ead4cf632a28235cb8a69 (diff) | |
download | trace-cmd-8bbbaaaf78ecd479d149fc84ab7d50be90c3540d.tar.gz |
trace-cmd: Keep default bash completion to list files
This will keep trace-cmd default completion behave like before.
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-cmd.bash | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/trace-cmd.bash b/trace-cmd.bash index 3b76af2d..c7c5cae6 100644 --- a/trace-cmd.bash +++ b/trace-cmd.bash @@ -42,8 +42,9 @@ _trace_cmd_complete() COMPREPLY=( $(compgen -W "${funcs}" -- "${cur}") ) ;; *) - # By default, we do not provide any hints. - COMPREPLY=() + # By default, we list files + local files=$(ls --color=never) + COMPREPLY=( $(compgen -W "${files}" -- "$cur") ) ;; esac } |