From bec53135e4e826e204c3d11df9854a53403d11e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Thu, 11 Aug 2016 01:55:38 +0200 Subject: [PATCH] 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 --- plugins/pj/pj.plugin.zsh | 3 +-- 1 file changed, 1 insertion(+), 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