Oof. Posix non-compliant stuff always gives me the ick.
I highly recommend switching to zsh, it can do the same stuff and more, and it is actually a proper terminal. Switching scripts might be a bit complicated if you’re deep into it, but it’s worth it
You can also just do a
sudo !!the!!is a shorthand for whatever you tried to run previously.Was about to say, why would you copy anything when using
sudo !!lol… because I had no idea about this until now. Sweet!
Not all shells support that.
I use fish btw.
Holy shit I wish fish supported it. I just press up arrow then hold left arrow and manually type sudo. It fucking sucks
I’ve been using this plugin https://github.com/oh-my-fish/plugin-bang-bang fish also allows going through previous arguments with alt+up
I made my own !!
I know what you meant (I have one for fish as well), but I chucked because you looked very enthusiastic about it!
The fish function for
!!is super useful thoughBruh
What shell are you using? In both bash and zsh,
!!is a substitute for a previous commandFish
Oof. Posix non-compliant stuff always gives me the ick.
I highly recommend switching to zsh, it can do the same stuff and more, and it is actually a proper terminal. Switching scripts might be a bit complicated if you’re deep into it, but it’s worth it
All I do in terminal is type, I don’t know scripting. But I heard a lot of things about zsh.
Oh-my-zsh is a good start then. It gives you a bunch of themes and presets and plugins so you can do whatever you want with your zsh
I’ll try thanks for the recommendation.