dvorka / hstr

bash and zsh shell history suggest box - easily view, navigate, search and manage your command history.
http://me.mindforger.com
Apache License 2.0
3.97k stars 232 forks source link

Delete history without printing whole history by `history -r` #348

Open foray1010 opened 5 years ago

foray1010 commented 5 years ago

Is it possible to config hstr to not print out whole history by history -r after deleting history? I found it quite annoying because it shows little information (it is a super long list) and it flushed out all my scrollback which may be useful in some situtation

qazip commented 5 years ago

Did you find a way to do this?

@dvorka, after deleting an entry and doing "ctrl+c", history -r runs, printing the whole history. Any way to avoid that?

dvorka commented 4 years ago

Perhaps I can make it configurable. The purpose of history -r is to get history items from shell sessions in other terminals to the current one. I agree that it might be subjective and some users don't need it. WDYT?

foray1010 commented 4 years ago

@dvorka how about history -r > /dev/null? seems can keep the functionality and do not flush the screen

pkral78 commented 4 years ago

I also suspected another weird behavior that is related to history deletion. When an item from history is deleted (and deletion is confirmed with 'y') then selecting another item from history appends string history -r to it. So for example when (after deletion) I select by TAB line git log it actually constructs on command line string git loghistory -r.

pkral78 commented 4 years ago

Note, that it behave same for 2.0.0 (tested on Ubuntu) and 2.2.0 (tested in NixOS). And by the way: this is most useful utility I've found ever. Magic :-)

dvorka commented 4 years ago

@pkral78 Oh, your are right - it's reproducible! I created https://github.com/dvorka/hstr/issues/386. Thank you for the report!

And by the way: this is most useful utility I've found ever. Magic :-) My pleasure!

selurvedu commented 1 year ago

@dvorka #386 is actually not fixed, see https://github.com/dvorka/hstr/issues/386#issuecomment-1103557204

selurvedu commented 1 year ago

Bump. I made #457 to fix this.