notes/scripts/rdir
2022-12-08 13:24:52 -08:00

11 lines
400 B
Bash
Executable file

#!/bin/bash
# A simple bookmarking alias used in conjunction with sdir and our $HOME/.aliases file to bookmark our current directory to be returned to later using rdir.
# grabs the rc file of preferred shell (only works with bash and zsh currently)
shellrc=.$(echo "$SHELL" | awk -F '/' '{ print $NF }')rc
# grabs the current $sdir environment variable
source "$HOME"/"$shellrc"
cd "$sdir" && ls