Paste Selection in

This script use curl and xsel to makes Geany paste your editor selection in and return the url in your clipboard.

Download the script below - you will need to chmod u+x for make the script executable.

Add the custom command to Geany: Edit → Format → Send Selection To → Set Custom Commands → Add

Type the name of script ( or optionally you can write the whole custom command here:

sh -c "curl -s -F 'f:1=<-' | xsel -ib; exit 1"

Both, script or one liner command will work very well.
# The script need be in path or you will need specify complete script path
# in Custom Commands Add box.
sel=$(< /dev/stdin);
curl -s -F "f:1=$sel" | xsel -ib
echo -n "$sel";
exit 1