Created
November 26, 2014 12:35
-
-
Save vrs/e8ac140bb6b9e50bfbc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $1 =~ ^http ]]; then #http, https | |
url=$1 | |
else # everything else | |
url="http://$1" | |
fi | |
escaped=$(perl -MURI::Escape -e 'print uri_escape($ARGV[0], "(),");' "$url") | |
firefox -P default -remote "openURL(${escaped}, new-tab)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment