Changeset View
Changeset View
Standalone View
Standalone View
bin/sh/histedit.c
Show First 20 Lines • Show All 379 Lines • ▼ Show 20 Lines | histcmd(int argc, char **argv __unused) | ||||
if (editor) { | if (editor) { | ||||
char *editcmd; | char *editcmd; | ||||
fclose(efp); | fclose(efp); | ||||
INTON; | INTON; | ||||
editcmd = stalloc(strlen(editor) + strlen(editfile) + 2); | editcmd = stalloc(strlen(editor) + strlen(editfile) + 2); | ||||
sprintf(editcmd, "%s %s", editor, editfile); | sprintf(editcmd, "%s %s", editor, editfile); | ||||
evalstring(editcmd, 0); /* XXX - should use no JC command */ | evalstring(editcmd, 0); /* XXX - should use no JC command */ | ||||
readcmdfile(editfile); /* XXX - should read back - quick tst */ | readcmdfile(editfile, 0 /* verify */); /* XXX - should read back - quick tst */ | ||||
unlink(editfile); | unlink(editfile); | ||||
} | } | ||||
if (lflg == 0 && active > 0) | if (lflg == 0 && active > 0) | ||||
--active; | --active; | ||||
if (displayhist) | if (displayhist) | ||||
displayhist = 0; | displayhist = 0; | ||||
handler = savehandler; | handler = savehandler; | ||||
▲ Show 20 Lines • Show All 253 Lines • Show Last 20 Lines |