Index: src/actions.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/actions.c,v retrieving revision 1.185 diff -u -r1.185 actions.c --- src/actions.c 18 Nov 2003 05:06:35 -0000 1.185 +++ src/actions.c 23 Nov 2003 07:42:37 -0000 @@ -1044,6 +1044,7 @@ char *input; user_command *uc; int i; + if (data == NULL) return NULL; @@ -1079,9 +1080,13 @@ /* Append any arguments onto the end of the alias' command. */ s = sbuf_new (0); - sbuf_concat (s, alias_list[i].alias); - if (rest != NULL) - sbuf_printf_concat (s, " %s", rest); + if (strstr(alias_list[i].alias, "%s")) { + sbuf_printf(s, alias_list[i].alias, rest); + } else { + sbuf_concat (s, alias_list[i].alias); + if (rest != NULL) + sbuf_printf_concat (s, " %s", rest); + } alias_recursive_depth++; if (alias_recursive_depth >= MAX_ALIAS_RECURSIVE_DEPTH)