Improve a little bit the dummy implementation of
_lttng_complete_sessions and add two calls where it can be useful.
Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
#
_lttng_complete_sessions() {
#
_lttng_complete_sessions() {
- # TODO, maybe have a lttng list --simple or something like that
+ # TODO
+ # This code does nothing for now. When there is a mecanism to get the
+ # existing sessions, use it to fill the sessions variable.
+ local sessions
+ sessions=""
+ COMPREPLY=( $(compgen -W "${sessions}" -- $cur) )
COMPREPLY=( $(compgen -W "${list_opts}" -- $cur) )
return
;;
COMPREPLY=( $(compgen -W "${list_opts}" -- $cur) )
return
;;
+ *)
+ _lttng_complete_sessions
+ return
COMPREPLY=( $(compgen -W "${set_session_opts}" -- $cur) )
return
;;
COMPREPLY=( $(compgen -W "${set_session_opts}" -- $cur) )
return
;;
+ *)
+ _lttng_complete_sessions
+ return
+ ;;