diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-06 15:58:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-06 15:58:02 +0000 |
commit | 7800af31b52d359eb8234a5b997acc60089ab030 (patch) | |
tree | e9747fabc473497a80a7f788b35dafb1e9109870 /usr.bin/less/command.c | |
parent | 8c8aa46e183409b5293a7adada7d1d2c027cc29c (diff) |
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. |