HorreC @kbin.social
control shift R, then start typing, it will search your bash history
55 0 ReplyLobsterDog @frig.social
Is it not just Ctrl-R or is that platform dependent
16 1 Replycount_duckula @discuss.tchncs.de
I have always used ctrl-r but I just checked and both work. TIL.
6 0 Reply
mrmanager @lemmy.today
Hmm, normally it's just ctrl - r... Are you sure the shift is needed on your system?
12 0 Replylungdart @lemmy.ca
Don't forget fzf. That will really jazz up your history search!
3 0 ReplyHorreC @kbin.social
you are right, I must have just learned it with a shift for some dumb reason and it stuck, thank you internet person.
2 0 Replymed @sh.itjust.works Some variants have ctrl+r bound to something else
1 0 Reply
whofearsthenight @kbin.social Now if you had to guess how often I remember that there is a keyboard shortcut that does this, but don't remember what it is, and do remember that I can just press up 30-70 times...
7 0 ReplyHorreC @kbin.social
you can hit it again after you are dialed in as much as you want and it will keep going back in time with the words you have in there and stuff that matches!
3 0 Reply
Rikudou_Sage @lemmings.world
I recommend using mcfly for that, it makes it even better.
5 0 Replyfuckstick @lemmy.world This. It took a while for it to sink in but now itβs muscle memory and a huge time saver
4 0 ReplyBipta @kbin.social What now? What is r? How does this work?
3 0 Reply
DontRedditMyLemmy @lemmy.world Why r? Maybe if I knew why r, then I wouldn't forget this every 13 seconds...
3 0 Replydanielton @lemmy.world
Reverse search
10 0 Reply
m15otw @feddit.uk Ctrl+R
Then type any part of the command (filename, search string, etc)
Ctrl+R again to cycle through the matches.
(Best feature in bash)
50 0 Replyp0q @sh.itjust.works Use fzf for a more visual search.
12 0 ReplyLeanFemurs @lemmy.world
This is the way.
5 0 Reply
brakenium @lemm.ee I've been using this for a long time, never knew I could press Ctrl + R again. Thanks!
8 0 Replywandering_nomad @lemmy.world Ctrl + S to go the other way if you overshoot!
8 0 Reply
spoopyking @lemmy.fmhy.ml Or
history | grep 'command'
6 0 Replym15otw @feddit.uk Can't just hit enter to run the one you want then, though.
3 0 Reply
Sorse @discuss.tchncs.de
Also works in fish
1 0 ReplySidewayspeach @feddit.nl But how to go backwards and forwards through the results? I just cycle through again!!
1 0 Replym15otw @feddit.uk As @wandering_nomad@lemmy.world said above, Ctrl+S
1 0 Reply
LucidDaemon @lemmy.world Wish I knew this sooner.
1 0 Reply
tobier @lemmy.world This is why I switched to fish; it seems to be much smarter understanding what I want to type.
10 0 Replyamos @lemmy.world Yeah it's great how ctrl-r is kinda the default instead of something you have to go out of your way to use. Just start typing a command and the up arrow will only cycle through history that matches what you've typed so far.
7 0 Replysneeple @reddthat.com Idk exactly what plugin it is, but zsh + oh my zsh has exactly this same thing. So hard to live without now that I'm used to it. Probably my favorite feature
2 0 Reply
amos @lemmy.world Yeah it's great how ctrl-r is kinda the default instead of something you have to go out of your way to use. Just start typing a command and the up arrow will only cycle through history that matches what you've typed so far.
1 1 Replyamos @lemmy.world Yeah it's great how ctrl-r is kinda the default instead of something you have to go out of your way to use. Just start typing a command and the up arrow will only cycle through history that matches what you've typed so far.
1 1 Reply
ttk @feddit.de fzf masterrace
10 0 Replyskomposzczet @vlemmy.net
up, up, up, up, up, cd .., ah there it is.
10 0 Replyvimdiesel @lemmy.world β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ β¬οΈ
9 0 ReplyAceticon @lemmy.world It's like the bus-stop-paradigm: If I wait just a bit longer and it will come. Meanwhile it would've been faster to walk.
8 0 ReplyBadland9085 @lemm.ee To anyone who uses vim mode,
?
lets you search through your stored command history, from normal mode ofc.7 0 ReplyIgnacio @kbin.social
It's even faster if you look for it inside .bash_history.
7 0 ReplyTeeetris @feddit.nl Still noup
2 0 Reply
Sketchpad01 @lemmy.world
Using the history command just to find the specific IP I need to ssh to
7 0 Replydriving_crooner @lemmy.eco.br
More like to find ping -O 8.8.8.8
1 0 Reply
Ephur @lemmy.world I create so many aliases with the notion of how much time Iβll saveβ¦ never use βem. Works out okay though because a much richer history to fzf through
5 0 Replycorytheboyd @kbin.social
5 0 ReplySocsa @sh.itjust.works We will history | grep docker until morale improves
5 0 ReplyJasonDJ @vlemmy.net Gah it's all
docker container ps -a
. OK, fine,history | grep "docker run"
.Next time I'll put a file in the project directory that tells me how I ran it and .gitignore it. I promise. Next time.
4 0 Reply
brutalbeard @geddit.social history | grep {search term}
4 0 ReplyKonata @sh.itjust.works
"python3 -m http.server"
4 0 ReplyTiTeY' @programming.dev BOTThis is the way!
4 0 ReplySlayer π¦ @lemmy.fmhy.ml
I just use the 'fuck' command after lazily typing letters that somewhat match the command I want to run
4 0 Reply(des)mosthenes @lemmy.world
https://github.com/marlonrichert/zsh-autocomplete Autocomplete for Zsh
3 0 ReplyLandedGentryOnlyClub @lemmy.fmhy.ml Yeah but last time I typed it, it worked. Who knows what ridiculous typos I'd make right now?
3 0 Replybillygoat @lemmy.fmhy.ml Iβve always used set -o vi. Letβs you use vi commands on the bash prompt.
3 0 ReplyNoah Jorgensen @sh.itjust.works
I just manage to forget what to type and I'm too lazy to look it up. that and I'm lazy
2 0 ReplyParculis Marcilus @reddthat.com
Tfw I rather type it out instead of searching through the history
2 0 Replybastion @lemmy.fmhy.ml I use xonsh, which has decent history - start your command, and up arrow cycles through commands stating with what you typed.
There's good stuff and bad stuff about xonsh.
1 0 ReplyParculis Marcilus @reddthat.com
I rarely use fuzzy finder to search up the commands that I'm going to use. If you realise that a certain command with arguments is often being used, you should create an alias for it so that you don't have need that memory load. That being said, I appreciate shell like fish provides auto complete (derived from command history) to speed up my workload.
1 0 Reply
DumBirb @kbin.social It's not about the keystrokes. It's the principle!
2 0 Replywatson387 @sopuli.xyz
Oh shit I definitely do this XD
2 0 Replykaffiene @lemmy.world I feel seen.
1 0 Replyoriginal2 @lemmy.world poweroff
1 0 ReplySploosh the Water @vlemmy.net
Lol stop attacking me! π
1 0 Reply0x4E4F @sh.itjust.works
Ctrl + R to search in command history π.
1 0 Reply(des)mosthenes @lemmy.world
old habits die hard autocomplete for your shell is so clutch though
1 0 Reply737 @lemmy.blahaj.zone i use vi mode in zsh for that reason, its pretty good
1 0 ReplyMinusPi (she/they) @pawb.social up up up up up up up up oh wait down
1 1 Reply