diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/actions.c | 19 |
2 files changed, 15 insertions, 7 deletions
@@ -1,5 +1,8 @@ 2003-06-25 Shawn Betts <sabetts@sfu.ca> + * src/actions.c (cmd_gmove): prompt the user if no group is passed + as an argument. + * contrib/rpws: call /bin/bash (rp_call): remove extraneous () in function declaration. (ws_init_ws): likewise diff --git a/src/actions.c b/src/actions.c index c1e8ac3..d51f326 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3596,21 +3596,26 @@ cmd_groups (int interactive, char *data) char * cmd_gmove (int interactive, char *data) { + char *str; rp_group *g; - if (data == NULL) - { - message (" gmove: one argument required "); - return NULL; - } - if (current_window() == NULL) { message (" gmove: no focused window "); return NULL; } - g = find_group (data); + /* Prompt for a group */ + if (data == NULL) + str = get_input (MESSAGE_PROMPT_SWITCH_TO_GROUP, group_completions); + else + str = xstrdup (data); + + /* User aborted. */ + if (str == NULL) + return NULL; + + g = find_group (str); if (g == NULL) { message (" gmove: cannot find group "); |