=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/command.c,v retrieving revision 1.20 retrieving revision 1.21 diff -c -r1.20 -r1.21 *** src/usr.bin/less/command.c 2015/11/06 15:50:33 1.20 --- src/usr.bin/less/command.c 2015/11/06 15:58:01 1.21 *************** *** 50,56 **** 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 */ --- 50,55 ---- *************** *** 243,267 **** /* 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; --- 242,247 ---- *************** *** 1435,1441 **** 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. --- 1415,1420 ---- *************** *** 1560,1577 **** * Set an initial command for new files. */ start_mca(A_FIRSTCMD, "+", NULL, 0); - 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; --- 1539,1544 ----