From 4095d48c2039526f4c7a57007fc383a99a96be40 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Thu, 18 Feb 2016 11:49:18 +0100 Subject: [PATCH] Fixed bug with folder names containing whitespaces --- bspwm/.config/scripts/explorer_run.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bspwm/.config/scripts/explorer_run.sh b/bspwm/.config/scripts/explorer_run.sh index 4403d0b..b97f281 100755 --- a/bspwm/.config/scripts/explorer_run.sh +++ b/bspwm/.config/scripts/explorer_run.sh @@ -24,23 +24,23 @@ while true; do echo "$UP"; echo "$OPEN_EXPLORER"; echo "$OPEN_TERMINAL"; - ls $DIR; + ls "$DIR"; ) | $DMENU -i ) if [ -z "$choice" ]; then exit 1 elif [ "$choice" == "$UP" ]; then - DIR=$(dirname $DIR) + DIR=$(dirname "$DIR") elif [ "$choice" == "$OPEN_EXPLORER" ]; then ($OPEN_CMD "$DIR" &) & exit 0 elif [ "$choice" == "$OPEN_TERMINAL" ]; then - ( cd $DIR; $TERM_CMD &) & + ( cd "$DIR"; $TERM_CMD &) & exit 0 elif [ -f "$DIR/$choice" ]; then ($OPEN_CMD "$DIR/$choice" &) & exit 0 elif [ -d "$DIR/$choice" ]; then - DIR=$DIR/$choice + DIR="$DIR/$choice" fi done