summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2016-08-11 01:55:38 +0200
committerMarc Cornellà <marc.cornella@live.com>2016-08-16 08:32:43 +0200
commitbec53135e4e826e204c3d11df9854a53403d11e3 (patch)
tree98cbf0e2695e008badb6f111d8e64305ccbc1f03
parent7d298a3059f4df72866b4ef649675b594120f453 (diff)
downloadzsh-bec53135e4e826e204c3d11df9854a53403d11e3.tar.gz
zsh-bec53135e4e826e204c3d11df9854a53403d11e3.tar.bz2
zsh-bec53135e4e826e204c3d11df9854a53403d11e3.zip
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
-rw-r--r--plugins/pj/pj.plugin.zsh3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh
index bb3d9c058..84d0cfa65 100644
--- a/plugins/pj/pj.plugin.zsh
+++ b/plugins/pj/pj.plugin.zsh
@@ -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