9f801ff48d46847e3c91e58b2ba2f5b61f6dcef8
- Author
- Markus Faerevaag <mafaer@gmail.com>
- Committer
- Markus Faerevaag <mafaer@gmail.com>
- Date
Message
[wd] fix space in path
Diff
1diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh
2index d63e92472aadfbb1bfd5822fbe3acb2c8f97af54..5ecbdc5035496dd1ec96e734800b45c594281019 100755
3--- a/plugins/wd/wd.sh
4+++ b/plugins/wd/wd.sh
5@@ -139,7 +139,7 @@ wd_add()
6 if [[ $point =~ "^[\.]+$" ]]
7 then
8 wd_exit_fail "Warp point cannot be just dots"
9- elif [[ $point =~ "(\s|\ )+" ]]
10+ elif [[ $point =~ "[[:space:]]+" ]]
11 then
12 wd_exit_fail "Warp point should not contain whitespace"
13 elif [[ $point == *:* ]]
14@@ -151,7 +151,7 @@ wd_add()
15 elif [[ ${points[$2]} == "" ]] || $force
16 then
17 wd_remove $point > /dev/null
18- printf "%q:%q\n" "${point}" "${PWD}" >> $WD_CONFIG
19+ printf "%q:%s\n" "${point}" "${PWD}" >> $WD_CONFIG
20
21 wd_print_msg $WD_GREEN "Warp point added"
22