You are not logged in.

#1 Today 09:47:19

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 3,021

package hstr

In debian there is the package hstr.

❯ apt show hstr
Package: hstr
Version: 3.1+ds-1+b1
Priority: optional
Section: utils
Source: hstr (3.1+ds-1)
Maintainer: Daniel Echeverri <epsilon@debian.org>
Installed-Size: 80,9 kB
Depends: libc6 (>= 2.34), libncursesw6 (>= 6), libreadline8t64 (>= 6.0), libtinfo6 (>= 6)
Homepage: https://github.com/dvorka/hstr
Tag: uitoolkit::ncurses
Download-Size: 30,5 kB
APT-Manual-Installed: yes
APT-Sources: https://deb.debian.org/debian trixie/main amd64 Packages
Description: Suggest box like shell history completion
 Command line tool that brings improved bash/zsh command completion
 from the history. It aims to make completion easier and more efficient
 than Ctrl-r.
 .
 HSTR can also manage your command history (for instance you can remove
 commands that are obsolete or contain a piece of sensitive information)
 or bookmark your favorite commands.

Called 'hstr' in the terminal, it tells me which (historical) commands I used. If I enter 'f', I find 'fastfetch' as an example.

Unfortunately, I can't immediately call up the command I found again with Enter. So I have to copy the command and enter it again in the terminal.

Does anyone know of a workaround that would make it work anyway?(without copying first)

Last edited by unklar (Today 09:48:54)

Offline

#2 Today 10:05:49

brontosaurusrex
Senior Associate, Middle Office
Registered: 2015-09-29
Posts: 2,806
Website

Re: package hstr

Don't know about hstr, but with fzf configured, the usual keybind is ctrl+r and it should display interactive selector, like

❯
  4193    cd bin
  4194    lst
  4195    rm hhx
  4196    uptime
  4198    up
  4199    cowsay woot
  4200    pi
  4202    reset
  4205    hstr h
  4206    hstr
  4207    history 0 | grep '^hx '
  4209    cd
> 4210    sudo apt install hstr
  4212    hstr fast
  4213    hstr ^fast
  4214    hstr fastfetch
  4216    hstr -i fastfetch
  4217    man hstr
  4218    hstr | fzf
  4219    myip                                                                                                                                             │
  4147/4147 +S ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>

then you select and enter or type to search for specific incantation. (I'am on zsh, but should work the same with bash irc).

Online

Board footer

Powered by FluxBB