Change [ to [[ and ~ to $HOME.

This commit is contained in:
Darren 'Tadgy' Austin 2019-07-01 15:29:32 +01:00
commit 2b57c9a4c3
3 changed files with 19 additions and 19 deletions

View file

@ -155,7 +155,7 @@ PS4="+(\[\e[33m\]\\\$? = \$?\[$(tput sgr0)\]) \[$(tput bold)$(tput setaf 4)\]\${
# Platform specific set up.
_PLATFORM="$(uname -s)"
if [ "$_PLATFORM" = "Linux" ]; then
if [[ "$_PLATFORM" = "Linux" ]]; then
# Linux specific aliases.
hash ftpwho >/dev/null 2>&1 && alias ftpwho='ftpwho -v'
hash iftop >/dev/null 2>&1 && alias iftop='TERM=vt100 iftop'
@ -171,7 +171,7 @@ if [ "$_PLATFORM" = "Linux" ]; then
psgrep() {
ps -auwwx | egrep "(RSS|$1)"
}
elif [ "$_PLATFORM" = "Darwin" ]; then
elif [[ "$_PLATFORM" = "Darwin" ]]; then
# Darwin specific aliases.
hash df >/dev/null 2>&1 && alias df='df -P'
hash ls >/dev/null 2>&1 && alias ls='ls -bFG'