summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-21 17:15:34 -0500
committerJune McEnroe <june@causal.agency>2019-11-21 17:15:34 -0500
commit7483f7c9cd94d0546fd047296e28d8f913b28766 (patch)
tree73663564be2650fc5769c0696fe8649dcf9aa80d /bin
parentRevert "Set default ENV to ~/.config/cash/cashrc" (diff)
downloadsrc-7483f7c9cd94d0546fd047296e28d8f913b28766.tar.gz
src-7483f7c9cd94d0546fd047296e28d8f913b28766.zip
Do not apply expansion to HISTFILE
Diffstat (limited to 'bin')
-rw-r--r--bin/1sh/histedit.c16
1 files changed, 4 insertions, 12 deletions
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);
 }