Remove duplicate history entries in command buffer
Kornel Benko
kornel at lyx.org
Mon Jul 11 10:53:43 UTC 2022
Am Mon, 11 Jul 2022 10:53:23 +0200
schrieb Kornel Benko <kornel at lyx.org>:
> Am Mon, 11 Jul 2022 00:15:40 +0200
> schrieb Jean-Marc Lasgouttes <lasgouttes.lyx.org at free.fr>:
>
> > Le 10/07/2022 à 22:05, Kornel Benko a écrit :
> > > So I was not clear enough. With 'duplicated' I meant anywhere in the history.
> > >
> > > The (my) argument was seeing the session file full of the same commands
> > > spread all over the file, essentially shortening the maximum (different) commands
> > > possible.
> > >
> > > I was testing findadv, the session file was full of 'regex-mode', 'unicode-insert,
> > > etc.
> >
> > Does this cause actual issue, or is it just 'untidy'?
>
> Asking this way I'd say 'actual issue'.
> Searching for some entry (which you know have used) can be long, even if not using many
> different commands.
>
> > Repeated commands at the end are a pain, I agree with that. But further
> > in past, they are a memory of useful command sequences.
> >
> > JMarc
>
> Good point. OTOH repeated sequences would accumulate too in this case.
>
> So the outcome may be a new preference?
>
> Kornel
Maybe the preference in tcsh describes our different views.
(I am using tcsh, you bash)
Here the excerpt from tcsh(1)
histdup (+)
Controls handling of duplicate entries in the history list. If set to
`all' only unique history events are entered in the history list. If set to
`prev' and the last history event is the same as the current command, then the
current command is not entered in the history. If set to `erase' and the same
event is found in the history list, that old event gets erased and the
current one gets inserted. Note that the `prev' and `all' options renumber
history events so there are no gaps.
(I am setting
set histdup=erase
in .cshrc)
The behaviour like in bash would be set with 'set histdup=prev')
Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220711/7e800e20/attachment-0001.asc>
More information about the lyx-devel
mailing list