mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
[wd] fix space in path
This commit is contained in:
parent
b5093859af
commit
9f801ff48d
1 changed files with 2 additions and 2 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue