[lttng-dev] [PATCH lttng-tools 2/5] bash completion: Remove underscores in handler function names

simon.marchi at polymtl.ca simon.marchi at polymtl.ca
Mon Jul 29 15:22:42 EDT 2013


From: Simon Marchi <simon.marchi at polymtl.ca>

If the command name contains a dash, it is removed to derive the
function name that will handle completion. For example, add-context
becomes _lttng_cmd_addcontext. The functions with erroneous names
were not getting called.

Reported-by: Daniel U. Thibault <daniel.thibault at drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>
---
 extras/lttng-bash_completion |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/extras/lttng-bash_completion b/extras/lttng-bash_completion
index efd5f58..a90820a 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)
 
@@ -182,7 +182,7 @@ _lttng_cmd_disablechannel() {
 	esac
 }
 
-_lttng_cmd_disable_event() {
+_lttng_cmd_disableevent() {
 	local disable_event_opts
 	disable_channel_opts=$(lttng disable-event --list-options)
 
@@ -222,7 +222,7 @@ _lttng_cmd_list() {
 	esac
 }
 
-_lttng_cmd_set_session() {
+_lttng_cmd_setsession() {
 	local set_session_opts
 	set_session_opts=$(lttng set-session --list-options)
 
-- 
1.7.1




More information about the lttng-dev mailing list