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

Re: Path with spaces in _canonical_paths



On Mon, Nov 21, 2022 at 9:41 AM Thomas Gläßle <thomas@xxxxxxxxxx> wrote:
>
> +  local -a tmp_buffer
> +  compadd -A tmp_buffer "$__gopts[@]" -a files
>  [...]
> +    matches+=( "${(@)tmp_buffer/$canpref/$origpref}" )
>     else
>       # ### Ideally, this codepath would do what the 'if' above does,
>       # ### but telling compadd to pretend the "word on the command line"
>       # ### is ${"the word on the command line"/$origpref/$canpref}.
> -    matches+=(${${(M)files:#$canpref*}/$canpref/$origpref})
> +    matches+=(${${(M)tmp_buffer:#$canpref*}/$canpref/$origpref})
>     fi

I'm not confident that's the right fix for other examples, given the
"Ideally" comment there.  Daniel, you were the last editor of that
section of _canonical_paths but the change appears to have been
related to its use in _mount (where it is no longer used now).  Any
comment?




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