aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/xyzzy.sh6
-rw-r--r--man/man6/xyzzy.6df4
2 files changed, 6 insertions, 4 deletions
diff --git a/games/xyzzy.sh b/games/xyzzy.sh
index 5cc03278..b4fc4695 100644
--- a/games/xyzzy.sh
+++ b/games/xyzzy.sh
@@ -1,6 +1,8 @@
# ADVENTURE
-if [ -e "$HOME"/.xyzzy ] ; then
+state=${XDG_CONFIG_HOME:-$HOME/.config}/xyzzy/dest
+mkdir -p -- "${state%/*}"
+if [ -e "$state" ] ; then
printf >&2 '%s\n' 'Nothing happens.'
exit 1
fi
-printf '%s\n' 'I see no cave here.' > "$HOME"/.xyzzy
+printf '%s\n' 'I see no cave here.' > "$state"
diff --git a/man/man6/xyzzy.6df b/man/man6/xyzzy.6df
index 7270b95d..0d928b45 100644
--- a/man/man6/xyzzy.6df
+++ b/man/man6/xyzzy.6df
@@ -8,7 +8,7 @@
Invoking
.B xyzzy
in a directory will tag that directory as a target for teleportation, writing
-its name to the file ~/.xyzzy. Typing it again at any given point will then
-change into that marked directory.
+its name to the file $XDG_CONFIG_HOME/xyzzy/dest. Typing it again at any given
+point will then change into that marked directory.
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>