X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=extras%2Flttng-bash_completion;h=b515be08d484c9985e921556d9c313c0400d73e7;hp=00ac17ef0abf86d48e0a31999b0380581167bb8f;hb=bd722d76b035766511f0b329f9bbaa2f4180c4ed;hpb=fc256d995013fb0557601fd203531493e1dacff7 diff --git a/extras/lttng-bash_completion b/extras/lttng-bash_completion index 00ac17ef0..b515be08d 100644 --- a/extras/lttng-bash_completion +++ b/extras/lttng-bash_completion @@ -128,6 +128,44 @@ _lttng_cmd_enableevent() { esac } +_lttng_cmd_enableconsumer() { + local enable_consumer_opts + enable_consumer_opts=$(lttng enable-consumer --list-options) + + case $prev in + --session|-s) + _lttng_complete_sessions + return + ;; + esac + + case $cur in + -*) + COMPREPLY=( $(compgen -W "${enable_consumer_opts}" -- $cur) ) + return + ;; + esac +} + +_lttng_cmd_disableconsumer() { + local disable_consumer_opts + disable_consumer_opts=$(lttng disable-consumer --list-options) + + case $prev in + --session|-s) + _lttng_complete_sessions + return + ;; + esac + + case $cur in + -*) + COMPREPLY=( $(compgen -W "${disable_consumer_opts}" -- $cur) ) + return + ;; + esac +} + _lttng_cmd_disablechannel() { local disable_channel_opts disable_channel_opts=$(lttng disable-channel --list-options) @@ -171,7 +209,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) @@ -249,6 +287,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)