Skip to content

Commit 0adb4bd

Browse files
author
Nhoya
committed
better error output
1 parent d10c9bc commit 0adb4bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

z0r

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ readonly BOLD="\033[01m"
2323
readonly FINE="\033[0m"
2424

2525
ver='1.4'
26-
regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*\.[-A-Za-z0-9\+&@#/%=~_|():?]+'
26+
regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*\.[A-Za-z0-9\+&@%#/=~_|():?]+'
2727
is_z0r='http://z0r.it/[^ \n]'
2828
url=(http://$1)
2929
mode=-s
@@ -105,7 +105,7 @@ is_url(){
105105
echo -e $RED"Page does not exist"$FINE
106106
fi
107107
else
108-
echo -e $RED"Enter a valid url"$FINE
108+
echo -e $RED""$1" is not a valid url"$FINE
109109
fi
110110
fi
111111
}
@@ -159,7 +159,7 @@ while getopts ":hvlde:c:m:" opt; do
159159
esac
160160
done
161161
}
162-
if [[ $1=="" ]]; then
162+
if [ $# -eq 0 ]; then
163163
set -- "$clip"
164164
is_url $1
165165
else

0 commit comments

Comments
 (0)