From: David Goulet Date: Mon, 23 Jul 2012 12:45:34 +0000 (-0400) Subject: Add enable/disable consumer command to bash completion X-Git-Tag: v2.1.0-rc1~68 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=14c8c23f4a6cfd0c9758808bd1fcc6df6f6042d2;p=lttng-tools.git Add enable/disable consumer command to bash completion Signed-off-by: David Goulet --- diff --git a/extras/lttng-bash_completion b/extras/lttng-bash_completion index 9aacb0294..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)