summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Base/_tilde2
-rw-r--r--Completion/Core/_path_files4
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f9c6b968c..96ba287d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-05-16  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 11407: Completion/Base/_tilde, Completion/Core/_path_files:
+ 	avoid tilde- and parameter-completion in quotes
+	
 	* 11406: Completion/Base/_arguments: make _arguments take the
  	attempt to add matches as an indication not to do default
  	option-completion
diff --git a/Completion/Base/_tilde b/Completion/Base/_tilde
index 7d31185b7..59ac8d0f6 100644
--- a/Completion/Base/_tilde
+++ b/Completion/Base/_tilde
@@ -4,6 +4,8 @@
 # for you or if there are too many of them, you may want to use
 # `compadd -qS/ - "$friends[@]"' or something like that.
 
+[[ -n "$compstate[quote]" ]] && return 1
+
 local expl suf dirs list lines revlines i ret disp nm="$compstate[nmatches]"
 
 if [[ "$SUFFIX" = */* ]]; then
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index cd6700d5a..31dbcea15 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -160,7 +160,7 @@ eorig="$orig"
 
 # Now let's have a closer look at the string to complete.
 
-if [[ "$pre[1]" = \~ ]]; then
+if [[ "$pre[1]" = \~ && -z "$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
   # (in `realpath'), so that we can generate the matches. Then remove that
@@ -209,7 +209,7 @@ if [[ "$pre[1]" = \~ ]]; then
   orig="${orig#*/}"
   donepath=
   prepaths=( '' )
-elif [[ "$pre" = *\$*/* ]]; then
+elif [[ "$pre" = *\$*/* && "$compstate[quote]" != \" ]]; then
 
   # If there is a parameter expansion in the word from the line, we try
   # to complete the beast by expanding the prefix and completing anything