inp.c, disable command `edit' unless `interactive' has been set

This commit is contained in:
h_vogt 2016-01-09 15:57:48 +01:00 committed by rlar
parent 888bcce829
commit eef5a058d2
1 changed files with 7 additions and 0 deletions

View File

@ -1050,6 +1050,13 @@ com_edit(wordlist *wl)
bool inter, permfile;
char buf[BSIZE_SP];
if (!cp_getvar("interactive", CP_BOOL, NULL)) {
fprintf(cp_err,
"Warning: `edit' is disabled because 'interactive' has not been set.\n"
" perhaps you want to 'set interactive'\n");
return;
}
inter = cp_interactive;
cp_interactive = FALSE;
if (wl) {