summaryrefslogtreecommitdiff
path: root/usr.bin/less/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/less/command.c')
-rw-r--r--usr.bin/less/command.c33
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.