Changed cd to builtin cd in scripts and aliases

This commit is contained in:
Talia 2021-02-25 09:56:39 +01:00
parent e56ccdca8e
commit 00e84e554d
2 changed files with 5 additions and 5 deletions

View file

@ -4,15 +4,15 @@ root="$(git rev-parse --show-toplevel 2>/dev/null)"
if [ -z "$root" ]
then
cd "$@"
builtin cd "$@"
else
if [ -z "$1" ]
then
cd "$root"
builtin cd "$root"
else
if [ $(echo "$1" | grep '^/') ]
then cd "$root"$@
else cd "$@"
then builtin cd "$root"$@
else builtin cd "$@"
fi
fi
fi

View file

@ -2,7 +2,7 @@ alias ls="ls --color=auto"
alias ll="ls -lA"
alias gcd="source git-cd"
alias g="source cd-improved"
alias gg="cd $HOME; g ."
alias gg="builtin cd $HOME; g ."
alias hello='echo "Hello :)"'
alias w='watch -t -d -n 1'
alias setclip='xclip -selection c'