From d1cd9dddf1c925c8e2871f9b6f0559ea2f8595e4 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 10 Nov 2025 15:08:26 -0700 Subject: [PATCH] Add quotes around location variable. --- files/dwm/storage.function | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/dwm/storage.function b/files/dwm/storage.function index 7cb0a94..f202843 100755 --- a/files/dwm/storage.function +++ b/files/dwm/storage.function @@ -5,16 +5,16 @@ function storage { location="$1" style="$2" - if [[ -z $location ]]; then + if [[ -z "$location" ]]; then echo "ERROR: Location must be passed. $location" fi if [[ "$style" == "%" || "$style" == "pct" || "$style" == "percent" ]]; then - df -h $location | tail -n 1 | awk {print $5} + df -h "$location" | tail -n 1 | awk {print $5} elif [[ "$style" == "/" || "$style" == "use" || "$style" == "usage" ]]; then - df -h $location | tail -n 1 | awk {print $3"/"$2} + df -h "$location" | tail -n 1 | awk {print $3"/"$2} else - df -h $location | tail -n 1 | awk {print $5" Free, "$3"/"$2" Used"} + df -h "$location" | tail -n 1 | awk {print $5" Free, "$3"/"$2" Used"} fi }