Download raw body.
preventing non-sensical `mesg' in histedit
On Tue, Jul 12, 2022 at 05:15:50PM +0200, Omar Polo wrote: > Omar Polo <op@omarpolo.com> wrote: > > Stefan Sperling <stsp@stsp.name> wrote: > > > On Mon, Jul 11, 2022 at 09:12:48PM +0200, Omar Polo wrote: > > > > while talking on irc this issue pop up: there can be some strange > > > > interactions between the commands in the histedit script. > > > > > > > > while none of this is really surprising, preventing `mesg' in some > > > > situations where the outcome is non-sensical. In particular, a fold or > > > > drop followed by a mesg. (in the first case the commit would be first > > > > reworded and then deleted, in the second case it would be reworded and > > > > then the new text discarded by fold.) > > > > > > > > so, the only valid options are pick -> mesg and edit -> mesg (which is > > > > used by the regress test at least.) It would be nice to prevent mesg -> > > > > mesg too maybe. > > > > > > Indeed, two consecutive mesg lines should also be a syntax error. > > > > on a second thought, here's a slightly different version that also > > catches the consecutive mesg (and adds a regress for it ;) > > > > I tried also to add a sentence to the manpage, but suggestion for a > > better phrasing are welcome (or i can drop it and let you fix the manpage) > > second thought of a second thought, i like this one more: Very nice indeed. OK. I like the idea of storing the previous command code instead of a pointer.
preventing non-sensical `mesg' in histedit