summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2002-01-24 11:18:12 +0000
committersabetts <sabetts>2002-01-24 11:18:12 +0000
commitd00e7292850d6b6913251a370801be740adba8e0 (patch)
tree785022674b2d059a216807d73dfadec08a8eb245
parentcb02a04e74094b5ab59e438145f33b0a61fd5fa4 (diff)
downloadratpoison-d00e7292850d6b6913251a370801be740adba8e0.zip
* src/actions.c (command): Append to the end of alias command the
arguments passed in before evaluating the alias.
-rw-r--r--ChangeLog2
-rw-r--r--src/actions.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 11506ea..5485c6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
* src/actions.c (find_alias_index): new function
(cmd_alias): When an alias is already in the alias list, replace
it with the new alias.
+ (command): Append to the end of alias command the arguments passed
+ in before evaluating the alias.
* src/events.c (configure_request): do not send a synthetic
configure notify event.
diff --git a/src/actions.c b/src/actions.c
index 2aadf38..c62faef 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -885,7 +885,17 @@ command (int interactive, char *data)
{
if (!strcmp (cmd, alias_list[i].name))
{
- result = command (interactive, alias_list[i].alias);
+ struct sbuf *s;
+
+ /* 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);
+
+ result = command (interactive, sbuf_get (s));
+
+ sbuf_free (s);
goto done;
}
}