X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=extras%2Flttng-bash_completion;h=b5f861c56a2fd55c5c2dfc6e463310a8b32cdf57;hp=00ac17ef0abf86d48e0a31999b0380581167bb8f;hb=a2bccc23d7d236691f76a9e01a647f9949a09928;hpb=fc256d995013fb0557601fd203531493e1dacff7 diff --git a/extras/lttng-bash_completion b/extras/lttng-bash_completion index 00ac17ef0..b5f861c56 100644 --- a/extras/lttng-bash_completion +++ b/extras/lttng-bash_completion @@ -20,7 +20,7 @@ _lttng_complete_sessions() { return } -_lttng_cmd_add_context() { +_lttng_cmd_addcontext() { local add_context_opts add_context_opts=$(lttng add-context --list-options) @@ -32,9 +32,6 @@ _lttng_cmd_add_context() { --channel|-c) return ;; - --event|-e) - return - ;; --type|-t) return ;; @@ -147,7 +144,7 @@ _lttng_cmd_disablechannel() { esac } -_lttng_cmd_disable_event() { +_lttng_cmd_disableevent() { local disable_event_opts disable_channel_opts=$(lttng disable-event --list-options) @@ -171,7 +168,7 @@ _lttng_cmd_disable_event() { _lttng_cmd_list() { local list_opts - disable_channel_opts=$(lttng list --list-options) + list_opts=$(lttng list --list-options) case $prev in --channel|-c) @@ -187,7 +184,7 @@ _lttng_cmd_list() { esac } -_lttng_cmd_set_session() { +_lttng_cmd_setsession() { local set_session_opts set_session_opts=$(lttng set-session --list-options) @@ -249,6 +246,17 @@ _lttng_cmd_calibrate() { esac } +_lttng_cmd_view() { + local view_opts + view_opts=$(lttng view --list-options) + + case $cur in + -*) + COMPREPLY=( $(compgen -W "${view_opts}" -- $cur) ) + ;; + esac +} + _lttng_opts() { local opts opts=$(lttng --list-options)