Add enable/disable consumer command to bash completion
authorDavid Goulet <dgoulet@efficios.com>
Mon, 23 Jul 2012 12:45:34 +0000 (08:45 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 23 Jul 2012 12:45:34 +0000 (08:45 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
extras/lttng-bash_completion

index 9aacb029491793d471b65810b5e1281e06fd2de7..b515be08d484c9985e921556d9c313c0400d73e7 100644 (file)
@@ -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)
This page took 0.026374 seconds and 4 git commands to generate.