Make terminal open in the directory of active directory

This commit is contained in:
Jonathan Hodgson 2018-05-01 09:44:57 +01:00
parent 7d53123d6d
commit 9735245bfb
4 changed files with 37 additions and 7 deletions

View file

@ -38,9 +38,9 @@ function mycd() {
cd "$@" 2> /dev/null
if [ $? = 0 ]; then
# If we get here cd was successful
if [ ! $TMUX ]; then
pwd > ~/.current-folder
fi
#if [ ! $TMUX ]; then
# pwd > ~/.current-folder
#fi
ls
else
# If we get here, cd was not successful

View file

@ -91,6 +91,6 @@ TRAPWINCH(){
zle && {zle reset-prompt; zle -R}
}
if [ -f ~/.current-folder ] && [ ! $TMUX ]; then
\cd "$(cat ~/.current-folder)"
fi
#if [ -f ~/.current-folder ] && [ ! $TMUX ]; then
# \cd "$(cat ~/.current-folder)"
#fi