Live data from Hacker News

Show HN: HSTR – easily view, navigate, search and manage your shell history

github.com

1–7 of 7 posts

Re: Show HN: HSTR – easily view, navigate, search and manage your shell history

#4
Awesome. Is there any way I can make it so ctrl+r invokes hstr (similar to how installing vim replaces vi)? It seems to be an stty setting but it isn't obvious, even after searching, if this is possible. If it is, would make a nice addition to the readme.

Re: Show HN: HSTR – easily view, navigate, search and manage your shell history

#5
post #4

Awesome. Is there any way I can make it so ctrl+r invokes hstr (similar to how installing vim replaces vi)? It seems to be an stty setting but it isn't obvious, even after searching, if this is possible. If it is, would make a nice addition to the readme.

I think the answer is "yes"; it seems to be covered in the configuration page: http://dvorka.github.io/hstr/CONFIGURATION.html#binding-hh-t...

It says to use

    bind '"\C-r": "\C-ahh -- \C-j"'
to bind to Ctrl-R; the "bind" command can be used in the shell directly. Alternatively, you can put

    "\C-r": "\C-ahh -- \C-j"
in your ~/.inputrc.

Re: Show HN: HSTR – easily view, navigate, search and manage your shell history

#6
post #5
post #4

Awesome. Is there any way I can make it so ctrl+r invokes hstr (similar to how installing vim replaces vi)? It seems to be an stty setting but it isn't obvious, even after searching, if this is possible. If it is, would make a nice addition to the readme.

I think the answer is "yes"; it seems to be covered in the configuration page: http://dvorka.github.io/hstr/CONFIGURATION.html#binding-hh-t... It says to use bind '"\C-r": "\C-ahh -- \C-j"' to bind to Ctrl-R; the "bind" command can be used in the shell directly. Alternatively, you can put "\C-r": "\C-ahh -- \C-j" in your ~/.inputrc.

@bewuethr exactly! BTW there is even easier way how to configure HSTR:

    hstr --show-configuration >> ~/.inputrc && . ~/.inputrc
You can run just hstr --show-configuration to check what will be appended

Re: Show HN: HSTR – easily view, navigate, search and manage your shell history

#7
post #6
post #5

Earlier quoted context omitted.

I think the answer is "yes"; it seems to be covered in the configuration page: http://dvorka.github.io/hstr/CONFIGURATION.html#binding-hh-t... It says to use bind '"\C-r": "\C-ahh -- \C-j"' to bind to Ctrl-R; the "bind" command can be used in the shell directly. Alternatively, you can put "\C-r": "\C-ahh -- \C-j" in your ~/.inputrc.

@bewuethr exactly! BTW there is even easier way how to configure HSTR: hstr --show-configuration >> ~/.inputrc && . ~/.inputrc You can run just hstr --show-configuration to check what will be appended

Ah, I had actually inadvertently done that using the one liner, but just hadn't restarted my terminal! Great tool, I love it!