From ab01a9a9cec9d09ad7ee8ba49b671209aded1af6 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:06:45 +0200 Subject: [PATCH] Add check for missing arguments Another error that occurred when refactoring the script before committing it. It was like this when I created it. I swear! --- .local/bin/zoom-links | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/zoom-links b/.local/bin/zoom-links index aed0900..e6a3fa4 100755 --- a/.local/bin/zoom-links +++ b/.local/bin/zoom-links @@ -15,7 +15,7 @@ command -v chromium-browser >/dev/null 2>&1 || return 1 command -v xclip >/dev/null 2>&1 || return 1 # If no argument is given, set the clipboard as argument -set "$(xclip -selection c -o)" +[ $# -gt 0 ] || set "$(xclip -selection c -o)" # Check for right format echo "$1" | grep -Eq "^https://tu-berlin.zoom.us/(j|wc/join)/[0-9]*\?pwd=.+" || return 1