From d00e7292850d6b6913251a370801be740adba8e0 Mon Sep 17 00:00:00 2001 From: sabetts Date: Thu, 24 Jan 2002 11:18:12 +0000 Subject: * src/actions.c (command): Append to the end of alias command the arguments passed in before evaluating the alias. --- src/actions.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/actions.c') 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; } } -- cgit v1.2.3