Commit 9f801ff4 authored by Markus Faerevaag's avatar Markus Faerevaag
Browse files

[wd] fix space in path

parent b5093859
...@@ -139,7 +139,7 @@ wd_add() ...@@ -139,7 +139,7 @@ wd_add()
if [[ $point =~ "^[\.]+$" ]] if [[ $point =~ "^[\.]+$" ]]
then then
wd_exit_fail "Warp point cannot be just dots" wd_exit_fail "Warp point cannot be just dots"
elif [[ $point =~ "(\s|\ )+" ]] elif [[ $point =~ "[[:space:]]+" ]]
then then
wd_exit_fail "Warp point should not contain whitespace" wd_exit_fail "Warp point should not contain whitespace"
elif [[ $point == *:* ]] elif [[ $point == *:* ]]
...@@ -151,7 +151,7 @@ wd_add() ...@@ -151,7 +151,7 @@ wd_add()
elif [[ ${points[$2]} == "" ]] || $force elif [[ ${points[$2]} == "" ]] || $force
then then
wd_remove $point > /dev/null 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" wd_print_msg $WD_GREEN "Warp point added"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment