diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-01-24 19:53:38 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-01-24 19:53:38 +0000 |
commit | 80107f99da3b67201c712344950c91128c136b23 (patch) | |
tree | 623f84ed3392417fc769ee596cf48331531533b6 /usr.bin/tmux/client.c | |
parent | 38c599a96818f72492019b9f38af1421b37c2e65 (diff) |
Add support for custom command aliases, this is an array option which
contains items of the form "alias=command". This is consulted when an
unknown command is parsed.
Diffstat (limited to 'usr.bin/tmux/client.c')
-rw-r--r-- | usr.bin/tmux/client.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index bc617d545b9..ad7f3bf7b49 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.119 2017/01/23 10:09:43 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.120 2017/01/24 19:53:37 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -252,16 +252,13 @@ client_main(struct event_base *base, int argc, char **argv, int flags, * flag. */ cmdlist = cmd_list_parse(argc, argv, NULL, 0, &cause); - if (cmdlist == NULL) { - fprintf(stderr, "%s\n", cause); - return (1); - } - cmdflags &= ~CMD_STARTSERVER; - TAILQ_FOREACH(cmd, &cmdlist->list, qentry) { - if (cmd->entry->flags & CMD_STARTSERVER) - cmdflags |= CMD_STARTSERVER; + if (cmdlist != NULL) { + TAILQ_FOREACH(cmd, &cmdlist->list, qentry) { + if (cmd->entry->flags & CMD_STARTSERVER) + cmdflags |= CMD_STARTSERVER; + } + cmd_list_free(cmdlist); } - cmd_list_free(cmdlist); } /* Create client process structure (starts logging). */ |