[zsh] alert alias
This commit is contained in:
parent
1c35699739
commit
eb8835848f
@ -42,3 +42,7 @@ alias -g L='|less -R'
|
||||
|
||||
# command S equivalent to command &> /dev/null &
|
||||
alias -g S='&> /dev/null &'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# 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$//'\'')"'
|
||||
|
Loading…
Reference in New Issue
Block a user