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

Re: Filename Expansion



On Sun, Oct 6, 2024 at 9:10 PM limited time <burnermail4now@xxxxxxxxx> wrote:
>
> The documentation says :-
>
> Each word is checked to see if it begins with an unquoted ‘~’. If it does, then the word up to a ‘/’, or the end of the word if there is no ‘/’, is checked to see if it can be substituted in one of the ways described here. If so, then the ‘~’ and the checked portion are replaced with the appropriate substitute value.
>
> A ‘~’ by itself is replaced by the value of $HOME.
>
> ------
>
> It appears that a ~ if followed by a quoted character only expands if that character is ‘/‘. And no expansion occurs if tilde is immediately followed by @,#,%,=,^… quoted or unquoted.
>
> Can someone confirm what’s going on here ? Thanks.

This is what the documentation you quoted says will happen, and is the
correct behavior.

-- 
Mikael Magnusson




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