mirror of
https://github.com/GRFreire/scripts.git
synced 2026-01-09 20:59:37 +00:00
fix: firefox should not open with an empty choice
This commit is contained in:
parent
c884ced6fc
commit
b26330a3e9
@ -25,9 +25,9 @@ rm $DB
|
|||||||
CHOICE=$(echo "$OPTIONS" | $CMD -p "Firefox quick open:")
|
CHOICE=$(echo "$OPTIONS" | $CMD -p "Firefox quick open:")
|
||||||
|
|
||||||
# Check choice
|
# Check choice
|
||||||
URL=$(echo "$CHOICE" | awk '{print $NF}') || exit
|
URL=$(echo "$CHOICE" | awk '{print $NF}') || exit 0
|
||||||
VALID=$(echo "$OPTIONS" | grep "$URL")
|
VALID=$(echo "$OPTIONS" | grep "$URL")
|
||||||
if [ -n "$VALID" ]; then
|
if [ -n "$VALID" ] && [ -n "$CHOICE" ]; then
|
||||||
firefox $URL
|
firefox $URL
|
||||||
else
|
else
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user