File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1414first_argument=${1// / +}
1515second_argument=${2// / +}
1616
17- if [ " $1 " = " " ]; then
18- open " https://www.google.com/maps"
19- elif [ " $2 " = " " ]; then
20- open " https://www.google.com/maps/search/$first_argument "
17+ if [ " $1 " != " " ]; then
18+ if [ " $2 " = " " ]; then
19+ open " https://www.google.com/maps/dir/?api=1&origin=$first_argument "
20+ else
21+ open " https://www.google.com/maps/dir/?api=1&origin=$first_argument &destination=$second_argument "
22+ fi
23+ elif [ " $1 " = " " ] && [ " $2 " != " " ]; then
24+ open " https://www.google.com/maps/dir/?api=1&origin=Current+Location&destination=$second_argument "
2125else
22- open " https://www.google.com/maps/dir/ $first_argument / $second_argument "
26+ open " https://www.google.com/maps"
2327fi
You can’t perform that action at this time.
0 commit comments