浏览代码

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
Marc Cornellà 8 年之前
父节点
当前提交
bec53135e4
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      plugins/pj/pj.plugin.zsh

+ 1 - 2
plugins/pj/pj.plugin.zsh

@@ -2,7 +2,6 @@ alias pjo="pj open"
 
 
 pj () {
 pj () {
     emulate -L zsh
     emulate -L zsh
-    setopt shwordsplit
 
 
     cmd="cd"
     cmd="cd"
     project=$1
     project=$1
@@ -10,7 +9,7 @@ pj () {
     if [[ "open" == "$project" ]]; then
     if [[ "open" == "$project" ]]; then
         shift
         shift
         project=$*
         project=$*
-        cmd=$EDITOR
+        cmd=${=EDITOR}
     else
     else
         project=$*
         project=$*
     fi
     fi