From f56d066799eeadd261b2bc77f656cc234905b1d4 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 31 Dec 2025 10:14:52 +0200 Subject: feat(.bashrc): On pushd (and cd), if dir doesn't exist, try it relative to $HOME --- .bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 911203e..02b0bb9 100644 --- a/.bashrc +++ b/.bashrc @@ -258,7 +258,9 @@ export PROMPT_COMMAND="shell_var_fix;" # Changing directory {{{ pushd() { ___dirchanged="y" - builtin pushd "${1:-$HOME}" >/dev/null + set "${1:-$HOME}" + [ ! -e "$1" ] && set "$HOME/$1" + builtin pushd "$1" >/dev/null } popd() { ___dirchanged="$PWD" -- cgit v1.3.1-26-gb76a