Support passing weather location
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 10 Jan 2020 20:46:51 +0000 (15:46 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 10 Jan 2020 20:46:51 +0000 (15:46 -0500)
home/lib/login_functions.sh

index 5cb3709..4517697 100644 (file)
@@ -312,7 +312,12 @@ note() {
 }
 
 weather() {
-    curl "http://wttr.in/$WEATHER_LOCATION"
+    local _weather_location
+    case "$1" in
+        '') _weather_location="$WEATHER_LOCATION";;
+         *) _weather_location="$1"
+    esac
+    curl "http://wttr.in/$_weather_location"
 }
 
 bt_devs_paired() {
This page took 0.033693 seconds and 4 git commands to generate.