commit c048be856605d7d92b90ad02f1bdd27aaf55ab02 parent cba23c426fa9eb6e8dc5ff9c877374280c7af0f8 Author: Jacob R. Edwards <jacobouno@protonmail.com> Date: Sun, 15 Nov 2020 18:39:38 -0800 Add directory bookmarking aliases Diffstat:
| M | rc/aliases/.config/aliases/cd | | | 5 | +++++ |
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/rc/aliases/.config/aliases/cd b/rc/aliases/.config/aliases/cd @@ -29,3 +29,8 @@ cdc() { # a standard? _=`smatch -d $@ <${XDG_CONFIG_HOME:?unset}/cdc` && eval cd $_ } + +# set a directory to do things in other than the wd. +dset() { export DDIR="${1:?No directory}" ;} +dget() { echo ${DDIR:?Directory} ;} +ddo() { dget && (cd $DDIR && $@) ;}