summaryrefslogtreecommitdiff
path: root/plugins/wd
diff options
context:
space:
mode:
authorMarkus Faerevaag <mafaer@gmail.com>2014-10-21 09:51:13 +0200
committerMarkus Faerevaag <mafaer@gmail.com>2014-10-21 09:54:15 +0200
commit9f801ff48d46847e3c91e58b2ba2f5b61f6dcef8 (patch)
treef212947b146c6ba686cfbfdc102723a598cbd309 /plugins/wd
parentb5093859af472c04dfca33adfeba49bfbe417c9d (diff)
downloadzsh-9f801ff48d46847e3c91e58b2ba2f5b61f6dcef8.tar.gz
zsh-9f801ff48d46847e3c91e58b2ba2f5b61f6dcef8.tar.bz2
zsh-9f801ff48d46847e3c91e58b2ba2f5b61f6dcef8.zip
[wd] fix space in path
Diffstat (limited to 'plugins/wd')
-rwxr-xr-xplugins/wd/wd.sh4
1 files 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"