14
u/CommunismIsForLosers Apr 18 '21
"history", then !{the line num of the command}
0
10
6
u/Nico_Weio Apr 18 '21
Even better than Ctrl+R is resh.
0
Apr 19 '21
[deleted]
2
u/Nico_Weio Apr 19 '21
Nope, I don't know that.
fzf(a general-purpose fuzzy finder) provides a similar GUI and I assume there is something using it for what you want. I personally use https://github.com/OrkoHunter/keep which does not have such a pretty UI, but for occasional use it's just fine.
6
u/bottleboy8 Apr 18 '21
One of my favorite commands that I never remember:
nc -l -p 7000 | pv | tar xIt receives a netcat pipe from a command like this:
tar cf - ./* | pv | nc 192.168.1.30 7000I didn't write it. Not even completely sure how it works. But it sure sends a bunch of files quickly from one computer to another.
4
u/kesslar21 Apr 19 '21
I usually do history | grep -i something~that~I~remember~from~the~command lol then in Linux mint, highlight the command, and then middle click to paste into the session.
1
u/perdigaoperdeuapena Apr 19 '21
Yep, same here, as I've answered to a comment above.
I have an alias in my .bashrc
alias hg="history | grep"then I just have to
hg some-command-I-want-to-reuse
2
1
1
1
1
1
1
u/goatmale Apr 22 '21
Gotta use Fish shell, I only have to type a few characters and then hit up a few times.
0
u/SmallerBork Apr 18 '21
All I want is for Ctrl + C and Ctrl + V to do what they do in every other program
2
u/revdandom Apr 19 '21
I just wish there was Linux distro that made the win/command key the default for copy paste undo. In the mean time there is Kinto.
0
Apr 18 '21
[deleted]
2
4
u/SmallerBork Apr 18 '21
I didn't say I didn't know how to copy and paste. I said I want the shortcuts to be the same as in other programs.
I hate having to use the shift key for this, it's not really hard but it's quite uncomfortable.
1
Apr 19 '21
I prefer to ctrl+c my mistake, copy and paste is less important!
1
u/SmallerBork Apr 19 '21
That's Ctrl + Z, but if they were easily remappable everyone would be happy.
1
59
u/Serindu Apr 18 '21
I learned about Ctrl + r recently, and my up arrow thanks me.