aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--cmd2.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f9c8f7e..87544c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-08 kalev
+
+ * cmd2.c: Move aliases/actions back to default group if it was
+ specified as '*'.
+
2009-04-07 jahara
* cmd2.c: Fixed setting alias/action groups back to default.
diff --git a/cmd2.c b/cmd2.c
index 0c00202..41a26eb 100644
--- a/cmd2.c
+++ b/cmd2.c
@@ -196,7 +196,7 @@ void parse_alias __P1 (char *,str)
if( (*np)->group != NULL )
free((*np)->group);
- if (*group == '\0')
+ if ( *group == '\0' || strcmp(group,"*") == 0 )
group = NULL;
(*np)->group = my_strdup(group);
@@ -576,7 +576,7 @@ void parse_action __P2 (char *,str, int,onprompt)
if( (*np)->group != NULL )
free( (*np)->group );
- if (*group == '\0')
+ if ( *group == '\0' || strcmp(group,"*") == 0 )
group = NULL;
(*np) -> group = my_strdup( group );