diff options
author | 2015-11-06 15:58:01 +0000 | |
---|---|---|
committer | 2015-11-06 15:58:01 +0000 | |
commit | be1ba4b86ce4b27d42a5ceba73eaa6064a2f4ea4 (patch) | |
tree | 68c733ccad4a1f68f7ec917074ffa59c39c89782 /usr.bin/less/command.c | |
parent | Garrett D'Amore has agreed to moving his copyright line up above the (diff) | |
download | wireguard-openbsd-be1ba4b86ce4b27d42a5ceba73eaa6064a2f4ea4.tar.xz wireguard-openbsd-be1ba4b86ce4b27d42a5ceba73eaa6064a2f4ea4.zip |
Remove support for ! to run a shell command, we have ^Z around these
parts. ok ratchov jung millert
Diffstat (limited to 'usr.bin/less/command.c')
-rw-r--r-- | usr.bin/less/command.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/usr.bin/less/command.c b/usr.bin/less/command.c index 4d881f037fa..2487a87507e 100644 --- a/usr.bin/less/command.c +++ b/usr.bin/less/command.c @@ -50,7 +50,6 @@ extern int shift_count; extern int oldbot; extern int forw_prompt; -static char *shellcmd = NULL; /* For holding last shell command for "!!" */ static int mca; /* The multicharacter command (action) */ static int search_type; /* The previous type of search */ static LINENUM number; /* The number typed by the user */ @@ -243,25 +242,6 @@ exec_mca(void) /* If tag structure is loaded then clean it up. */ cleantags(); break; - case A_SHELL: - /* - * !! just uses whatever is in shellcmd. - * Otherwise, copy cmdbuf to shellcmd, - * expanding any special characters ("%" or "#"). - */ - if (*cbuf != '!') { - if (shellcmd != NULL) - free(shellcmd); - shellcmd = fexpand(cbuf); - } - - if (secure) - break; - if (shellcmd == NULL) - lsystem("", "!done"); - else - lsystem(shellcmd, "!done"); - break; case A_PIPE: if (secure) break; @@ -1435,7 +1415,6 @@ again: error("WARNING: This file was viewed via " "LESSOPEN", NULL_PARG); } - start_mca(A_SHELL, "!", ml_shell, 0); /* * Expand the editor prototype string * and pass it to the system to execute. @@ -1563,18 +1542,6 @@ again: c = getcc(); goto again; - case A_SHELL: - /* - * Shell escape. - */ - if (secure) { - error("Command not available", NULL_PARG); - break; - } - start_mca(A_SHELL, "!", ml_shell, 0); - c = getcc(); - goto again; - case A_SETMARK: /* * Set a mark. |