This package (FZF) is also using the history file, perhaps there's 
something usable inside.
https://github.com/junegunn/fzf

Op zondag 11 februari 2024 om 06:41:11 UTC+1 schreef Kurtis Rader:

> Thanks, but that requires me to implement the code I would rather not have 
> to reinvent given that shells like Bash, Ksh, and Fish already have code to 
> do what I need. The problem is that those solutions are written in C and 
> C++ respectively rather than Go. While I consider myself an expert in C 
> (having started programming with it around 1985) I am only minimally 
> competent in C++. I'll translate the Fish C++ code into Go if I have to but 
> am hoping there is a published Go equivalent to save me that effort.
>
> P.S., This is to remove the dependency on a daemon process to update a 
> BoltDB database by the Fish shell. The BoltDB dependency (go.etcd.io/bbolt) 
> greatly increases the size and complexity of the Fish shell. The opaque 
> binary database managed by BoltDB is also annoying. It would be preferable 
> to use a flat file database using JSON or text protobufs for storing 
> command history.
>
> On Sat, Feb 10, 2024 at 9:15 PM 'Dan Kortschak' via golang-nuts <
> golan...@googlegroups.com> wrote:
>
>> On Sat, 2024-02-10 at 21:01 -0800, Kurtis Rader wrote:
>> > The only solution I can find that gets close to my requirements is
>> > https://github.com/ergochat/readline, but AFAICT it does not handle
>> > updates to the on-disk history file by concurrently executing
>> > processes.
>>
>> There is also https://pkg.go.dev/github.com/peterh/liner, which also
>> does not handle history persistence, but which makes it relatively easy
>> to add.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/e37a98a811c8e1cccfef8feffafef5260e7e5e56.camel%40kortschak.io
>> .
>>
>
>
> -- 
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ef46ee58-f20d-47c1-baef-fdf63681c2e9n%40googlegroups.com.

Reply via email to