From e29f67dde5c1ec8a76259b3f062a49deab028054 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 18 Aug 2018 18:31:51 -0400 Subject: Alias /n to /view n where n is a number --- input.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'input.c') diff --git a/input.c b/input.c index cb0a12c..c6ceb88 100644 --- a/input.c +++ b/input.c @@ -178,7 +178,14 @@ void input(struct Tag tag, char *input) { COMMANDS[i].handler(tag, input); return; } - uiFmt(TAG_STATUS, UI_WARM, "%s isn't a recognized command", command); + + char *trail; + strtol(&command[1], &trail, 0); + if (!trail[0]) { + inputView(tag, &command[1]); + } else { + uiFmt(TAG_STATUS, UI_WARM, "%s isn't a recognized command", command); + } } void inputTab(void) { -- cgit 1.4.1-2-gfad0