浏览代码

Merge branch 'apjanke-termsupport-protect-subshell'

Fixes #4565
Marc Cornellà 9 年之前
父节点
当前提交
dfe10af9fa
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      lib/functions.zsh
  2. 1 1
      lib/termsupport.zsh

+ 1 - 1
lib/functions.zsh

@@ -114,7 +114,7 @@ zmodload zsh/langinfo
 # Returns nonzero if encoding failed.
 # Returns nonzero if encoding failed.
 #
 #
 # Usage:
 # Usage:
-#  omz_urlencode [-r] [-m] <string>
+#  omz_urlencode [-r] [-m] [-P] <string>
 #
 #
 #    -r causes reserved characters (;/?:@&=+$,) to be escaped
 #    -r causes reserved characters (;/?:@&=+$,) to be escaped
 #
 #

+ 1 - 1
lib/termsupport.zsh

@@ -74,7 +74,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
     # the host name to disambiguate local vs. remote paths.
     # the host name to disambiguate local vs. remote paths.
 
 
     # Percent-encode the pathname.
     # Percent-encode the pathname.
-    local URL_PATH=$(omz_urlencode -P $PWD)
+    local URL_PATH="$(omz_urlencode -P $PWD)"
     [[ $? != 0 ]] && return 1
     [[ $? != 0 ]] && return 1
     local PWD_URL="file://$HOST$URL_PATH"
     local PWD_URL="file://$HOST$URL_PATH"
     # Undocumented Terminal.app-specific control sequence
     # Undocumented Terminal.app-specific control sequence