Skip to content

Commit ce0b201

Browse files
committed
bashrc: loosen vcs detection, alias GNU which
1 parent 05f9968 commit ce0b201

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bashrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ _ret_same() { return $?; }
8686
for script in /etc/bashrc.d/*; do . "$script"; done
8787

8888
# The prompt depends on vcs_status! Get one backup anyway.
89-
declare -f _vcs_status >/dev/null || ! echo _vcs_status not declared, making stub.. || alias _vcs_status=_ret_same
89+
type _vcs_status &>/dev/null || ! echo _vcs_status not declared, making stub.. || alias _vcs_status=_ret_same
9090

9191
# To be shipped together. See comments in bashrc_repo on _ret and _ret_status().
9292

@@ -102,12 +102,11 @@ fi
102102

103103

104104
# Extra Aliases for those lazy ones :)
105-
alias ..='cd ..'
106105
alias ...='cd ../..'
107106
alias ....='cd ../../..'
108107
alias nano='nano -w'
109108
alias ed='ed -p: -v' # ED for Eununchs hackers.
110-
_is_posix || which(){ (alias; declare -F) | /usr/bin/which -i --read-functions "$@"; }
109+
_is_posix || which --version | grep GNU &>/dev/null && alias which='(alias; declare -f) | which -i --read-functions'
111110

112111
# Misc stuffs
113112
FIGNORE='~'

0 commit comments

Comments
 (0)