aboutsummaryrefslogtreecommitdiff
path: root/scripts/open
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-10 22:28:57 -0300
committerEuAndreh <eu@euandre.org>2021-06-10 22:28:57 -0300
commitdb0645f1ec225a6353aa2adb58426bae2f75542a (patch)
tree33a3fb4bfb13eae8092262444ba9a23ff026e518 /scripts/open
parenttmux.conf: Remove unused key binding (diff)
downloaddotfiles-db0645f1ec225a6353aa2adb58426bae2f75542a.tar.gz
dotfiles-db0645f1ec225a6353aa2adb58426bae2f75542a.tar.xz
scripts/open: Do nothing when no argument is given
Diffstat (limited to '')
-rwxr-xr-xscripts/open8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/open b/scripts/open
index 7fa2d505..23f12fe2 100755
--- a/scripts/open
+++ b/scripts/open
@@ -1,5 +1,11 @@
#!/bin/sh
-set -eux
+set -eu
+
+if [ -z "${1:-}" ]; then
+ exit
+fi
+
+set -x
case "$1" in
*.ico|*.jpg|*.jpeg|*.png)