summary refs log tree commit diff
path: root/bin/cash/var.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-21 17:17:52 -0500
committerJune McEnroe <june@causal.agency>2019-01-21 17:17:52 -0500
commit40fb6999f72894c2dee95908b4d4160a63d98306 (patch)
tree0b8e1fc2ae70bb9879b194d5ce22ed6f4d9f7628 /bin/cash/var.c
parentRemove pingbot (diff)
downloadsrc-40fb6999f72894c2dee95908b4d4160a63d98306.tar.gz
src-40fb6999f72894c2dee95908b4d4160a63d98306.zip
Save cash history incrementally
Still needs better error and edge case handling, but seems to work.
Diffstat (limited to 'bin/cash/var.c')
-rw-r--r--bin/cash/var.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/cash/var.c b/bin/cash/var.c
index 26c39eb4..70e05385 100644
--- a/bin/cash/var.c
+++ b/bin/cash/var.c
@@ -108,10 +108,17 @@ struct localvar *localvars;
 int forcelocal;
 
 static const struct varinit varinit[] = {
-	{ &venv, 0, "ENV=${XDG_CONFIG_HOME:-${HOME}/.config}/cash/env.sh", NULL },
+	{
+		&venv, 0,
+		"ENV=${XDG_CONFIG_HOME:-${HOME}/.config}/cash/env.sh",
+		NULL,
+	},
 #ifndef NO_HISTORY
-	{ &vhistfile,	VUNSET,				"HISTFILE=",
-	  sethistfile },
+	{
+		&vhistfile, 0,
+		"HISTFILE=${XDG_DATA_HOME:-${HOME}/.local/share}/cash/history",
+		sethistfile,
+	},
 	{ &vhistsize,	VUNSET,				"HISTSIZE=",
 	  sethistsize },
 #endif
d>June McEnroe 2021-01-13Add hilex example to htagml manualJune McEnroe 2021-01-12Style causal.agency like bin HTMLJune McEnroe 2021-01-12Avoid matching tag text inside HTML elementsJune McEnroe 2021-01-12Use hilex for up -hJune McEnroe 2021-01-12Use hilex for bin HTMLJune McEnroe 2021-01-12Don't output a pre in hilex by defaultJune McEnroe 2021-01-12Move hilex out of hilex directoryJune McEnroe 2021-01-12Consolidate hilex formatters into hilex.cJune McEnroe 2021-01-12Remove hacky tagging from hilexJune McEnroe 2021-01-12Add htagml -iJune McEnroe 2021-01-12Render tag index in HTMLJune McEnroe 2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe 2021-01-12Split fields by tab onlyJune McEnroe 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe