Replacing the first '/' allows the 's' command name to be correctly
identified even though it is part of its own argument.

This is hacky because afterwards we will add the '/' back in before
calling the 'sed' program.

Signed-off-by: Silvan Jegen <[email protected]>
---
 vis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vis.c b/vis.c
index 628f511..201d88a 100644
--- a/vis.c
+++ b/vis.c
@@ -1764,7 +1764,7 @@ static bool exec_cmdline_command(const char *cmdline) {
        while (*name == ' ')
                name++;
        char *param = name;
-       while (*param && *param != ' ') {
+       while (*param && *param != ' ' && *param != '/') {
                if (*param == '!') {
                        opt |= CMD_OPT_FORCE;
                        break;
-- 
2.3.7


Reply via email to