Insert alias in the right place, GitHub issue 2842.

pull/2851/head
nicm 2021-08-22 13:00:28 +00:00
parent 0084cbef5a
commit c0048d6d20
1 changed files with 1 additions and 1 deletions

View File

@ -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)