Skip to content

Commit d10c9bc

Browse files
author
Nhoya
committed
using z0r without argument will take your clipboard content as argument
1 parent 00dd07f commit d10c9bc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

z0r

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ url=(http://$1)
2929
mode=-s
3030
dep=(curl awk xclip wget)
3131
apikey=4e4b657a91
32+
clip=$(xclip -o)
3233
LOGDIR=/$HOME/.z0r_logs
3334
#upload function (long -> short)
3435
shr(){
@@ -158,6 +159,10 @@ while getopts ":hvlde:c:m:" opt; do
158159
esac
159160
done
160161
}
161-
162+
if [[ $1=="" ]]; then
163+
set -- "$clip"
164+
is_url $1
165+
else
162166
opsparser $@
163167
is_url $1 $2
168+
fi

0 commit comments

Comments
 (0)