summaryrefslogtreecommitdiffstats
path: root/cmd-parse.y
diff options
context:
space:
mode:
authornicm <nicm>2021-08-22 13:00:28 +0000
committernicm <nicm>2021-08-22 13:00:28 +0000
commitc0048d6d20a056464a6b1b63e8bdc1793a29b029 (patch)
tree50462e7585d03cd51eb33e1dbc0f0a5c0b86a91e /cmd-parse.y
parent0084cbef5ad9f1f860b50fb7c485ac841817b3a8 (diff)
Insert alias in the right place, GitHub issue 2842.
Diffstat (limited to 'cmd-parse.y')
-rw-r--r--cmd-parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-parse.y b/cmd-parse.y
index 86917941..c27d530e 100644
--- a/cmd-parse.y
+++ b/cmd-parse.y
@@ -772,7 +772,7 @@ cmd_parse_expand_alias(struct cmd_parse_command *cmd,
TAILQ_REMOVE(&cmd->arguments, first, entry);
cmd_parse_free_argument(first);
- after = TAILQ_NEXT(TAILQ_FIRST(&last->arguments), entry);
+ after = TAILQ_FIRST(&last->arguments);
TAILQ_FOREACH_SAFE(arg, &cmd->arguments, entry, arg1) {
TAILQ_REMOVE(&cmd->arguments, arg, entry);
if (after == NULL)