Ajoute la fonction alert pour desktop

This commit is contained in:
Shikiryu 2016-06-03 12:51:36 +02:00
parent dec54d6658
commit 9aa6598096

View File

@ -14,6 +14,10 @@ if ! shopt -oq posix; then
fi
fi
# 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$//'\'')"'
export VISUAL=vim
export EDITOR="$VISUAL"