notes/scripts/rdir
2025-09-28 19:16:26 -07:00

19 lines
471 B
Bash
Executable file

#!/bin/bash
# A simple bookmarking script used in conjunction with rdir
# to save a directory for easy navigation later
sdrc="$HOME"/.sdrc
# grabs the current $sdir environment variable
if [[ -f "$sdrc" ]]; then
source "$sdrc"
else
printf "%s\n" "error: no .sdrc file."
printf "%s\n" "use sdir scriptt in desired directory first."
exit 1
fi
if [ -z "$sdoc" ]; then
cd "$sdir" && /usr/bin/exa --icons
else
cd "$sdir" && $EDITOR -c \'a "$sdoc"
fi