• vort3@lemmy.ml
    link
    fedilink
    arrow-up
    17
    arrow-down
    1
    ·
    edit-2
    18 days ago

    I comment the commands that I want and then use vim to remove ones without comments.

    For example, I run:

    longandannoyingcommand -f1 -f2 -f3 # keep, does something useful
    

    Usually comment explains what the command does so I can find it by description using fzf history search. And then you can easily find all lines that contain (or do not contain “# keep”) in your history to remove or keep.

  • Jinna@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    8
    ·
    18 days ago

    Atuin (by @ellie@hachyderm.io) makes the history storage and management side much easier and portable, but could perhaps use a “smite mode” to make deletion interactively easier. The current interactive implementation prioritizes safety over expediency which is fine, but a “today I clean things” option could perhaps instead prioritize the other way around and enable one key delete w/ undo instead.

  • karpintero@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    18 days ago

    I might try this. Normally would just pipe history into grep to search or scroll till I found the right command. Also smite is a great name for that function.