• 1 Post
  • 91 Comments
Joined 5年前
cake
Cake day: 2021年1月15日

help-circle


  • vort3@lemmy.mltoLinux@lemmy.mlCurate your shell history
    link
    fedilink
    arrow-up
    28
    arrow-down
    1
    ·
    edit-2
    3か月前

    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.













  • Well you can have 1 letter sequences which is almost what you want. For example have a sequence that consists of single “u” key that composes into “ü” or something similar.

    I don’t know if it’s the same in every DE/Distro, but in KDE I’m pretty sure I can both hold the Compose key and type sequences, or press Compose key once and then type a sequence.

    But can’t check right now.