Up up and away we go

2 years ago by alphacyberranger to c/programmerhumor

load all comments
SHOW_ME_YOUR_ASSHOLE 66 points 2 years ago

I'm not a programmer but I do this on the Linux command line all the time to find a command I used days or weeks ago. Or I'll spend 20 minutes grepping history instead. All to avoid spending 5 minutes reading the manpage so I can remember which flags and arguments I used.

path: 0 11804629, hotness: undefined, score: 66, children: 16
lord_ryvan 46 points 2 years ago

Perhaps pressing [Ctrl]+[R] and typing to search makes it easier, I mean instead of grepping history?
Most terminal emulators support it.

You can also change your query (backspacing and typing again) and press [Ctrl]+[R] multiple times to go to older matches.

path: 0 11804629 11805672, hotness: undefined, score: 46, children: 11
SHOW_ME_YOUR_ASSHOLE 9 points 2 years ago

I will have to try that, I didn't know that functionality existed, thanks!

path: 0 11804629 11805672 11806180, hotness: undefined, score: 9, children: 7
vort3 18 points 2 years ago

Let me tell you that you can also add comments to your terminal commands and use them to search history using fzf. This might sound confusing but basically you do this:

commandwithweirdoptions --option1=value1 --option2=value2 # run the usual thing

Then you press Ctrl+R and type anything like Β«the thingΒ», it uses fuzzy matching and finds the command in history, with a menu of other similar commands. Press enter, done.

Note that you need to have fzf installed, otherwise there is no fuzzy matching and no menu of matching history results.

path: 0 11804629 11805672 11806180 11807376, hotness: undefined, score: 18, children: 6
theherk 5 points 2 years ago path: 0 11804629 11805672 11822070, hotness: undefined, score: 5, children: 2
LiveLM 3 points 2 years ago

This looks super neat but I don't really like the idea of sending my shell history to a third party, nor can I host my own server right now.
Wish it was peer-to-peer like Syncthing

path: 0 11804629 11805672 11822070 11826686, hotness: undefined, score: 3, children: 1
programmerhumor
programmerhumor

@lemmy.ml

login for more options
43720
1626
1155

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

go to feed...