From 911f6055e5b8addb94befa5577413c37d9e069fb Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Thu, 21 Nov 2019 17:15:34 -0500 Subject: Do not apply expansion to HISTFILE --- bin/1sh/histedit.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'bin/1sh') diff --git a/bin/1sh/histedit.c b/bin/1sh/histedit.c index 32e798e3..ae24c1be 100644 --- a/bin/1sh/histedit.c +++ b/bin/1sh/histedit.c @@ -177,26 +177,18 @@ sethistfile(const char *hf) static void history_load(const char *hf) { HistEvent he; - const char *ehf; - ehf = expandstr(hf); - if (ehf == NULL) - return; - if (history(hist, &he, H_LOAD, ehf) == -1) - warning("%s: %s", he.str, ehf); + if (history(hist, &he, H_LOAD, hf) == -1) + warning("%s: %s", he.str, hf); } static void history_save(const char *hf) { HistEvent he; - const char *ehf; - ehf = expandstr(hf); - if (ehf == NULL) - return; - if (history(hist, &he, H_SAVE, ehf) == -1) - warning("%s: %s", he.str, ehf); + if (history(hist, &he, H_SAVE, hf) == -1) + warning("%s: %s", he.str, hf); } -- cgit 1.4.1