From 9aa65980965d4aa4e8dc5e5b1cba594a86f2b78a Mon Sep 17 00:00:00 2001 From: Shikiryu Date: Fri, 3 Jun 2016 12:51:36 +0200 Subject: [PATCH] Ajoute la fonction alert pour desktop --- .bashrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.bashrc b/.bashrc index 7368162..442270a 100644 --- a/.bashrc +++ b/.bashrc @@ -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"