From 30ff0776d60bb2b7b2045b17a0710545c13c85c1 Mon Sep 17 00:00:00 2001 From: fbt Date: Tue, 10 Feb 2015 16:50:10 +0300 Subject: [PATCH] $# --- sup | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sup b/sup index cc3d350..f25b4c5 100755 --- a/sup +++ b/sup @@ -153,7 +153,12 @@ main() { if (( flag_scrot )); then file="$(sup.scrot)" || { return 1; } else - target="$1"; [[ "$target" ]] || { sup.usage; exit 1; } + (( $# )) || { + sup.usage + return 1 + } + + target="$1" if sup.if_url "$target"; then file=$(sup.mktemp "$cfg_tmp_dir")