From 9f801ff48d46847e3c91e58b2ba2f5b61f6dcef8 Mon Sep 17 00:00:00 2001 From: Markus Faerevaag Date: Tue, 21 Oct 2014 09:51:13 +0200 Subject: [PATCH] [wd] fix space in path --- plugins/wd/wd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index d63e92472..5ecbdc503 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -139,7 +139,7 @@ wd_add() if [[ $point =~ "^[\.]+$" ]] then wd_exit_fail "Warp point cannot be just dots" - elif [[ $point =~ "(\s|\ )+" ]] + elif [[ $point =~ "[[:space:]]+" ]] then wd_exit_fail "Warp point should not contain whitespace" elif [[ $point == *:* ]] @@ -151,7 +151,7 @@ wd_add() elif [[ ${points[$2]} == "" ]] || $force then wd_remove $point > /dev/null - printf "%q:%q\n" "${point}" "${PWD}" >> $WD_CONFIG + printf "%q:%s\n" "${point}" "${PWD}" >> $WD_CONFIG wd_print_msg $WD_GREEN "Warp point added"