Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug: cd auto-completion of .. fails with parentheses in directory name



Daniel Shahaf wrote on Sat, Oct 29, 2016 at 18:06:32 +0000:
> diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
> index 0d36b54..32942d7 100644
> --- a/Completion/Unix/Type/_path_files
> +++ b/Completion/Unix/Type/_path_files
> @@ -594,7 +594,7 @@ for prepath in "$prepaths[@]"; do
>      # There are more components, so skip over the next components and make a
>      # slash be added.
>  
> -    tmp1=( ${tmp1//(#b)([][()|*?^#~<>\\=])/\\${match[1]}} )
> +    #tmp1=( ${tmp1//(#b)([][()|*?^#~<>\\=])/\\${match[1]}} )
>      tmp2="${(M)tpre##${~skips}}"
>      if [[ -n "$tmp2" ]]; then
>        skipped="/$tmp2"

I've reviewed the code again.  I believe that at the preceding
'compfiles -i' call, tmp1 is an input parameter containing a list of
unquoted filenames, and is not modified by the call, so this patch is
correct.

Committed in eccb7471b577d55f0b410088fc1125016476b332, with a regression
test.

I'd add some reverse-engineered docs for bin_compfiles()'s -i case but
I can't type right now.

@all, please report breakage if any, with completiosn of oddly-named
directories.

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author