diff --git a/.bashrc b/.bashrc index b662d988a4ccbe7d8108d200ca3bc1660ff60c2e..6db6c0a6a2726523674eea33e4a200b6abc430a0 100644 --- a/.bashrc +++ b/.bashrc @@ -86,7 +86,7 @@ alias gen-mac="hexdump -n5 -e '\"02\" 5/1 \":%02X\" \"\\n\"' /dev/urandom" alias clean-swp="find \$HOME/ -name '*.swp' -delete" alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking no\"" alias todo="vim \$HOME/Documents/TODO.yml" -alias sudo="sudo " +alias sudo="sudo --preserve-env=PATH" alias git="git " alias xargs="xargs " alias presentation='docker dev adarnimrod/presentation' @@ -130,15 +130,6 @@ for line in stdin.readlines(): fi } -monitor () { - if eval "$@" - then - notify-send "${1#__} has finished." - else - notify-send --urgency=critical "${1#__} has failed." - fi -} - # shellcheck disable=SC2120 json_tool () { if [ -t 0 ] diff --git a/Documents/bin/monitor b/Documents/bin/monitor new file mode 100755 index 0000000000000000000000000000000000000000..df3645e65be8b2a69ae73bfdade0bd988c600fab --- /dev/null +++ b/Documents/bin/monitor @@ -0,0 +1,9 @@ +#!/bin/sh +set -eu +[ "$#" -eq "0" ] || exit 0 +if eval "$@" +then + notify-send "${1#__} has finished." +else + notify-send --urgency=critical "${1#__} has failed." +fi