* Unexpected globbing when expanding history
@ 2024-06-14 16:31 Roman Perepelitsa
2024-06-14 17:14 ` Mikael Magnusson
0 siblings, 1 reply; 4+ messages in thread
From: Roman Perepelitsa @ 2024-06-14 16:31 UTC (permalink / raw)
To: Zsh hackers list
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
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[@]}"
Roman
[-- Attachment #2: Type: text/html, Size: 398 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Unexpected globbing when expanding history
2024-06-14 16:31 Unexpected globbing when expanding history Roman Perepelitsa
@ 2024-06-14 17:14 ` Mikael Magnusson
2024-06-14 20:26 ` Mark J. Reed
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2024-06-14 17:14 UTC (permalink / raw)
To: Roman Perepelitsa; +Cc: Zsh hackers list
On Fri, Jun 14, 2024 at 6:32 PM Roman Perepelitsa
<roman.perepelitsa@gmail.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Unexpected globbing when expanding history
2024-06-14 17:14 ` Mikael Magnusson
@ 2024-06-14 20:26 ` Mark J. Reed
2024-06-15 0:11 ` Mikael Magnusson
0 siblings, 1 reply; 4+ messages in thread
From: Mark J. Reed @ 2024-06-14 20:26 UTC (permalink / raw)
To: Zsh hackers list
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
On Fri, Jun 14, 2024 at 1:15 PM Mikael Magnusson <mikachu@gmail.com> wrote:
> History files are stored in metafied form,
But how does a literal character from the command turn into a token in the
metafied form? That seems like a confusion of levels that shouldn't be
possible.
FWIW, the problem goes away after starting a new shell, even keeping the
histfile. So the corruption doesn't seem to be happening on disk.
--
Mark J. Reed <markjreed@gmail.com>
[-- Attachment #2: Type: text/html, Size: 978 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Unexpected globbing when expanding history
2024-06-14 20:26 ` Mark J. Reed
@ 2024-06-15 0:11 ` Mikael Magnusson
0 siblings, 0 replies; 4+ messages in thread
From: Mikael Magnusson @ 2024-06-15 0:11 UTC (permalink / raw)
To: Mark J. Reed; +Cc: Zsh hackers list
On Fri, Jun 14, 2024 at 10:37 PM Mark J. Reed <markjreed@gmail.com> wrote:
>
>
> On Fri, Jun 14, 2024 at 1:15 PM Mikael Magnusson <mikachu@gmail.com> wrote:
>>
>> History files are stored in metafied form,
>
>
> But how does a literal character from the command turn into a token in the metafied form? That seems like a confusion of levels that shouldn't be possible.
fc -p takes as the first argument the path to a zsh format histfile,
which on this command line is created with contents that are not a
valid zsh format histfile.
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-15 0:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14 16:31 Unexpected globbing when expanding history Roman Perepelitsa
2024-06-14 17:14 ` Mikael Magnusson
2024-06-14 20:26 ` Mark J. Reed
2024-06-15 0:11 ` Mikael Magnusson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).