zsh-users
 help / color / mirror / code / Atom feed
* One other alternative history search widget
@ 2015-09-26 14:07 Sebastian Gniazdowski
  2015-09-26 23:45 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Gniazdowski @ 2015-09-26 14:07 UTC (permalink / raw)
  To: zsh-users

Hello
I've adapted the earlier announced zcurses based selection list so
that it works from within ZLE. It can be bound to the typical "^R" key
combination to provide history search. It uses whole screen and
highlights matches, what can be seen here:

https://asciinema.org/a/8d4w08o6cd5h0ueqvnm44qv0v

So, that's one other alternative history search widget, available here:
https://github.com/psprint/zsh-navigation-tools

One problem is that it puts multi line history entries into one line,
introducing '\n' where the newlines should be.

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: One other alternative history search widget
  2015-09-26 14:07 One other alternative history search widget Sebastian Gniazdowski
@ 2015-09-26 23:45 ` Bart Schaefer
  2015-09-27  7:08   ` Sebastian Gniazdowski
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2015-09-26 23:45 UTC (permalink / raw)
  To: zsh-users

On Sep 26,  4:07pm, Sebastian Gniazdowski wrote:
}
} One problem is that it puts multi line history entries into one line,
} introducing '\n' where the newlines should be.

Is that a problem with "history -nr" output, or is it a problem with
the representation necessary to allow curses-based list selection?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: One other alternative history search widget
  2015-09-26 23:45 ` Bart Schaefer
@ 2015-09-27  7:08   ` Sebastian Gniazdowski
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Gniazdowski @ 2015-09-27  7:08 UTC (permalink / raw)
  To: zsh-users

On 27 September 2015 at 01:45, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Sep 26,  4:07pm, Sebastian Gniazdowski wrote:
> }
> } One problem is that it puts multi line history entries into one line,
> } introducing '\n' where the newlines should be.
>
> Is that a problem with "history -nr" output, or is it a problem with
> the representation necessary to allow curses-based list selection?

It's rather difficult to implement multi-line entries in the curses
list. It doesn't support them right now, so the format gave by history
call is a plus. One quick idea is to keep array ENTRY_MULTIPLICITY
which would hold count of "\n"-s for each list entry. I would
implement that in separate n-list-multi-line. Line-wise n-list is fine
in the line-wise Unix world, but like in the history case, there are
situations where that isn't fully enough.

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-27  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-26 14:07 One other alternative history search widget Sebastian Gniazdowski
2015-09-26 23:45 ` Bart Schaefer
2015-09-27  7:08   ` Sebastian Gniazdowski

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).