Compare commits
2 commits
f5b24fbd72
...
d7d4d47814
Author | SHA1 | Date | |
---|---|---|---|
dece | d7d4d47814 | ||
dece | 468ccfd340 |
|
@ -67,7 +67,7 @@ def open_bang(config, handle, query):
|
|||
else:
|
||||
print("Unknown handle.")
|
||||
return
|
||||
url = bang["url"].format(urllib.parse.quote(query))
|
||||
url = bang["url"].format(urllib.parse.quote(query.strip()))
|
||||
webbrowser.open_new_tab(url)
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,12 @@ usage() {
|
|||
CONFIG_PATH="$HOME/.config/upload-text.conf"
|
||||
[ -f "$CONFIG_PATH" ] && . "$CONFIG_PATH"
|
||||
|
||||
# Check for our environment variables.
|
||||
if [ ! -v REMOTE_DEST ] || [ ! -v REMOTE_WWW ] || [ ! -v REMOTE_URL ]; then
|
||||
echo "You need to provide all the required environment variables."
|
||||
exit
|
||||
fi
|
||||
|
||||
# Generate a simple HTML page from the content.
|
||||
BASENAME="$(basename "$1")"
|
||||
HTML_FILE="$(mktemp)"
|
||||
|
|
Loading…
Reference in a new issue