+ superfile

This commit is contained in:
committer@tuxwarrior
2026-02-27 11:27:25 -05:00
parent 42ed92343e
commit ed2a1c7028
3 changed files with 201 additions and 0 deletions

View File

@@ -88,6 +88,26 @@ case ${TERM} in
esac
# ---
# superfile
# ---
spf() {
os=$(uname -s)
# Linux
if [[ "$os" == "Linux" ]]; then
export SPF_LAST_DIR="${XDG_STATE_HOME:-$HOME/.local/state}/superfile/lastdir"
fi
command spf "$@"
[ ! -f "$SPF_LAST_DIR" ] || {
. "$SPF_LAST_DIR"
rm -f -- "$SPF_LAST_DIR" > /dev/null
}
}
# ---
# searching
# ---