diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Base/_tilde | 2 | ||||
-rw-r--r-- | Completion/Core/_path_files | 4 |
2 files changed, 4 insertions, 2 deletions
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 |