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" ] if [ -z "$root" ]
then then
cd "$@" builtin cd "$@"
else else
if [ -z "$1" ] if [ -z "$1" ]
then then
cd "$root" builtin cd "$root"
else else
if [ $(echo "$1" | grep '^/') ] if [ $(echo "$1" | grep '^/') ]
then cd "$root"$@ then builtin cd "$root"$@
else cd "$@" else builtin cd "$@"
fi fi
fi fi
fi fi

View file

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