From: Michael D. Lowis Date: Wed, 12 Sep 2018 14:17:57 +0000 (-0400) Subject: tweaked argument handling for tags X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=19a997b78e7a2cf9f6ae9d1ca50521d95d95e873;p=projs%2Ftide.git tweaked argument handling for tags --- diff --git a/tide.c b/tide.c index bd699e2..9061df1 100644 --- a/tide.c +++ b/tide.c @@ -91,7 +91,8 @@ void exec(char* cmd) { /* see if it matches a builtin tag */ Tag* tag = tag_lookup(cmd); if (tag) { - while (*cmd && !isspace(*cmd++)); + for (; *cmd && !isspace(*cmd); cmd++); /* strip off tag name */ + for (; *cmd && isspace(*cmd); cmd++); /* strip off leading space */ tag_exec(tag, (*cmd ? strdup(cmd) : NULL)); } else { cmd_exec(cmd);