From: Antono Vasiljev Date: Fri, 12 Aug 2011 01:08:11 +0000 (+0300) Subject: general.aliases.bash: use native tree if [ -x ] .... X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=89da5f9ceccc5667ff4d946d25d4d4a5b2b98698;p=common%2Fbash_it.git general.aliases.bash: use native tree if [ -x ] .... --- diff --git a/aliases/available/general.aliases.bash b/aliases/available/general.aliases.bash index 74f5428..457d6b5 100644 --- a/aliases/available/general.aliases.bash +++ b/aliases/available/general.aliases.bash @@ -37,15 +37,19 @@ alias rb="ruby" alias piano="pianobar" -alias ..='cd ..' # Go up one directory -alias ...='cd ../..' # Go up two directories -alias -- -="cd -" # Go back +alias ..='cd ..' # Go up one directory +alias ...='cd ../..' # Go up two directories +alias ....='cd ../../..' # Go up two directories +alias -- -="cd -" # Go back # Shell History alias h='history' # Tree -alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" +if [ ! -x "$(which tree)" ] +then + alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" +fi # Directory alias md='mkdir -p'