Commit bec53135 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

Fix shwordsplit bug when a basedir contains spaces

The `shwordsplit` option affects all variables and we only need to split
the `$EDITOR` variable. Because of that, using `${=spec}` is a much better
alternative.

More info at
http://zsh.sourceforge.net/Doc/Release/Expansion.html#index-SH_005fWORD_005fSPLIT_002c-toggle
parent 7d298a30
......@@ -2,7 +2,6 @@ alias pjo="pj open"
pj () {
emulate -L zsh
setopt shwordsplit
cmd="cd"
project=$1
......@@ -10,7 +9,7 @@ pj () {
if [[ "open" == "$project" ]]; then
shift
project=$*
cmd=$EDITOR
cmd=${=EDITOR}
else
project=$*
fi
......
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