File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,17 @@ shopt -s histappend
5959export EDITOR=vim
6060export VISUAL=$EDITOR
6161
62- # Change to custom shell directory on startup
63- cd " $HOME /shell/bash" || exit
62+ # Change to custom shell directory on startup, except when shell did not start in $HOME
63+ # This lets tools like `chezmoi cd` keep their intended working directory.
64+ if [ " $PWD " = " $HOME " ]; then
65+ pushd " $HOME /shell/bash" || exit
66+ fi
6467
6568# SDKMAN initialization (must remain at end of file)
6669export SDKMAN_DIR=" $HOME /.local/sdkman"
6770[[ -s " $HOME /.local/sdkman/bin/sdkman-init.sh" ]] && source " $HOME /.local/sdkman/bin/sdkman-init.sh"
71+
72+ # chezmoi
73+ if [ -d " $HOME /.local/bin" ] ; then
74+ export PATH=" $PATH :$HOME /.local/bin"
75+ fi
You can’t perform that action at this time.
0 commit comments