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

Re: Unexpected globbing when expanding history



On Fri, Jun 14, 2024 at 6:32 PM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> This came my way via https://github.com/romkatv/zsh4humans/issues/313
>
>     % zsh -f
>     % fc -p =(print '\u30C7')
>     % : "${history[@]}"
>     zsh: no matches found: \M-c\n
>     % noglob : "${history[@]}"

That is a corrupted history file, which zsh will warn about when
debugging is enabled:
 hist.c:3771: bad(2) wordsplit reading history: \M-c\n
at: \M-c\n
word: \M-c^@

History files are stored in metafied form, this character probably
happens to correspond to the metafied form of the internal token for
some glob symbol.

-- 
Mikael Magnusson




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