Get the URL to be shortened
This commit is contained in:
parent
36c2314565
commit
a9b1c423a4
|
@ -40,4 +40,17 @@ case "$#" in
|
||||||
esac
|
esac
|
||||||
# ]]]
|
# ]]]
|
||||||
|
|
||||||
|
# Get URL to be shortened [[[
|
||||||
|
# Try to get URL from first argument
|
||||||
|
if [ ${flag_inline} ]; then
|
||||||
|
url_to_short="${1}"
|
||||||
|
fi
|
||||||
|
# Try to get URL from clipboard
|
||||||
|
if [ "${flag_clipboard}" ]; then
|
||||||
|
url_to_short=$(xclip -out)
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : URL to be shortened : ${url_to_short}"
|
||||||
|
# ]]]
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue