From cf002f8ab1fb5b6c77b86bfa58657bca40e564f1 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sun, 27 May 2018 17:18:05 +0300
Subject: [PATCH] Show the basename in the monitor notification.

---
 Documents/bin/monitor | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documents/bin/monitor b/Documents/bin/monitor
index df3645e..433afb7 100755
--- a/Documents/bin/monitor
+++ b/Documents/bin/monitor
@@ -1,9 +1,11 @@
 #!/bin/sh
 set -eu
-[ "$#" -eq "0" ] || exit 0
+
+[ "$#" -gt "0" ] || exit 0
+
 if eval "$@"
 then
-    notify-send "${1#__} has finished."
+    notify-send "$(basename "${1#__}") has finished."
 else
-    notify-send --urgency=critical "${1#__} has failed."
+    notify-send --urgency=critical "$(basename "${1#__}") has failed."
 fi
-- 
GitLab