From 9c7f298447bc225666f9baa957ce933f5493d437 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Fri, 3 Jun 2016 15:57:41 -0700 Subject: users/21609: do not treat tilde-expansions as quoted when inside command substitutions --- Completion/Unix/Type/_path_files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Completion/Unix') 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 -- cgit 1.4.1