summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2016-06-03 15:57:41 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2016-06-03 15:57:41 -0700
commit9c7f298447bc225666f9baa957ce933f5493d437 (patch)
tree467f335745d999d8449cb0dd56540c33e9f8d9ba
parentc5c471bc746aca1cafa97ee50527cf411d438464 (diff)
downloadzsh-9c7f298447bc225666f9baa957ce933f5493d437.tar.gz
zsh-9c7f298447bc225666f9baa957ce933f5493d437.tar.xz
zsh-9c7f298447bc225666f9baa957ce933f5493d437.zip
users/21609: do not treat tilde-expansions as quoted when inside command substitutions
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Type/_path_files2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 763c903c6..37a6fd9dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-03  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* users/21609: Completion/Unix/Type/_path_files: do not treat
+	tilde-expansions as quoted when inside command substitutions
+
 2016-06-03  Marko Myllynen  <myllynen@redhat.com>
 
 	* 38587: Completion/Linux/Command/_iconvconfig: Fix iconvconfig
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index c64ebf58c..14c4cc753 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -273,7 +273,7 @@ if [[ "$pre" = [^][*?#^\|\<\>\\]#(\`[^\`]#\`|\$)*/* && "$compstate[quote]" != \'
   orig="${orig[1,(in:i:)/][1,-2]}"
   donepath=
   prepaths=( '' )
-elif [[ "$pre[1]" = \~ && -z "$compstate[quote]" ]]; then
+elif [[ "$pre[1]" = \~ && "$compstate[quote]" = (|\`) ]]; then
 
   # It begins with `~', so remember anything before the first slash to be able
   # to report it to the completion code. Also get an expanded version of it