Skip to content

Commit 48348ea

Browse files
author
Nhoya
committed
fixed parsing error
1 parent 21d4a54 commit 48348ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

z0r

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
23
# Copyright (C) 2015 Nhoya.
34
#
45
# z0r is free software: you can redistribute it and/or modify
@@ -22,7 +23,7 @@ readonly YELLOW="\033[00;33m"
2223
readonly BOLD="\033[01m"
2324
readonly FINE="\033[0m"
2425

25-
ver='v1.7.2'
26+
ver='v1.7.3'
2627
regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*\.[A-Za-z0-9\+&@%#/=~_|():?]+'
2728
is_z0r='http://z0r.it/[^ \n]'
2829
url=(http://$1)
@@ -31,9 +32,9 @@ dep=(curl awk xclip wget)
3132
apikey=4e4b657a91
3233
clip=$(xclip -o 2>/dev/null)
3334
LOGDIR=/$HOME/.z0r_logs
34-
url_e=$(echo "$1"| sed 's/?/%3F/')
3535
#upload function (long -> short)
3636
shr(){
37+
url_e=$(echo $1| sed 's/?/%3F/')
3738
short=$(curl $mode -L "http://z0r.it/yourls-api.php?signature=$apikey&action=shorturl&title=uploaded_with_z0r_script&keyword=$2&format=simply&url=$url_e"|awk -F '/' '{print$NF}')
3839
uc="http://z0r.it/$short"
3940
if [ -n "$short" ]; then
@@ -205,8 +206,7 @@ if [ "$missing" == "1" ]; then
205206
fi
206207
opsparser $@
207208
if [ "$#" == "0" ]; then
208-
set -- "$clip"
209-
is_url $1
209+
is_url $clip
210210
else
211211
is_url $1 $2
212212
fi

0 commit comments

Comments
 (0)