bashrc & zshrc: OS X fixes.

This commit is contained in:
Mikaela Suomalainen 2014-05-01 14:50:14 +03:00
parent c2b0bcb8db
commit 050e1fd7ec
2 changed files with 19 additions and 0 deletions

9
bashrc
View File

@ -115,6 +115,11 @@ if [[ $UNAME != Darwin ]]; then
alias ll='ls -alFh --color=always' && alias la='ls -A --color=always' && alias l='ls -CF --color=always' alias ll='ls -alFh --color=always' && alias la='ls -A --color=always' && alias l='ls -CF --color=always'
fi fi
if [[ $UNAME = Darwin ]]; then
alias ll="ls -alFH"
alias l="ls -CF"
fi
# Add an "alert" alias for long running commands. Use like so: # Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert # sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
@ -146,6 +151,10 @@ if [[ $UNAME != Darwin ]]; then
who -H -w -u who -H -w -u
fi fi
if [[ $UNAME = Darwin ]]; then
who -H -u
fi
##### Environment 7RS56S ##### ##### Environment 7RS56S #####
# Environment should be placed to .environment or .bash_environment. # Environment should be placed to .environment or .bash_environment.

10
zshrc
View File

@ -83,10 +83,15 @@ zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
hostname hostname
uptime uptime
echo "" echo ""
if [[ $UNAME != Darwin ]] then; if [[ $UNAME != Darwin ]] then;
who -H -w -u who -H -w -u
fi fi
if [[ $UNAME = Darwin ]]; then
who -H -u
fi
##### Environment 7RS56S ##### ##### Environment 7RS56S #####
# Environment should be placed to .environment or .zsh_environment (or .zshenv). # Environment should be placed to .environment or .zsh_environment (or .zshenv).
@ -300,6 +305,11 @@ if [[ "$UNAME" != "Darwin" ]]; then
alias ll='ls -alFh --color=always' && alias la='ls -A --color=always' && alias l='ls -CF --color=always' alias ll='ls -alFh --color=always' && alias la='ls -A --color=always' && alias l='ls -CF --color=always'
fi fi
if [[ $UNAME = Darwin ]]; then
alias ll="ls -alFH"
alias l="ls -CF"
fi
# Add an "alert" alias for long running commands. Use like so: # Add an "alert" alias for long running commands. Use like so:
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'