It does make sense! When you modify a file, you do "things" on it, you write it. So the minimum you can possibly do to a file to modify it, is "to poke it": to touch it.
Hahahha, I just learnt about that gene a little while ago and thought the same: that's an stupid name for a gene. How would you name them? (the gene and the command)
Between the fuck utility and this alias idea, when I set up my next box I'm absolutely aliasing "fuck off" for sudo the last command and "please" for sudo itself
Not with the asterisk! The shell automatically expands the asterisk before sending the args to rm, removing every French language pack in your root directory.
side note: My all-time favorite linux utility is "fuck". When you make a mistake and get a command line error, you type the word fuck and it looks at what you previously typed and the error message, and tries to figure out your mistake and what you should have typed instead. Then it types that in for you. If it's correct all you have to do is hit Enter. Or you can edit first, but it's usually right. Amazing tool, and doesn't even use AI, just a list of common errors. It's been around for years and years. Its mere existence really captures the whole culture of linux IMO.
If I want a machine that does what it wants instead of what I want, I could use Windows. My machine should do what I want, so a please is not necessary.
I prefer to use kudasai ... but as some may already know, it should be at the end of the sentencecommand 😅, so I added a custom hook to my ZSH config to make it run commands as pacman -Syu kudasai.
Essentially you can add any type of string matching in the function. Add this to the end of your .zshrc file:
function kudasai_preexec() {
# Check if the last word is ' kudasai'
if [[ $1 == *" kudasai" ]]; then
# Remove ' kudasai' and prepend 'sudo'
cmd=${1%" kudasai"}
eval "sudo $cmd"
# Prevent the original command from running
return 1
fi
}
# Register the preexec hook
autoload -Uz add-zsh-hook
add-zsh-hook preexec kudasai_preexec
Edit: as downside you always get 1 exit code with this implementation (little_annoying) .
It’s a longer command. I wanna get shit done. I’m aliasing commands to make them shorter, not longer. But it does seem like it’d be a little friendlier.
115 Comments
Willem@kutsuya.dev · 181 pts · 1y
please killallI see...
cupcakezealot@lemmy.blahaj.zone · 5 pts · 1y
Make sure to combine it with
Disallow /harm/to/humanscm0002@lemmy.world · 164 pts · 1y
Or do the opposite for..relief
Fucking mv doc doc1
Fucking shutdown
thefartographer@lemm.ee · 123 pts · 1y
fucking touch my-docKalcifer@sh.itjust.works · 67 pts · 1y
please touch my-doc🥺👉👈cm0002@lemmy.world · 40 pts · 1y
( ͡° ͜ʖ ͡°)
MonkeyTown@midwest.social · 15 pts · 1y
I thought for sure, for sure this was bullshit. For sure Linux doesn’t have a touch command. What could it possibly do.?
Changing timestamps and creating empty files..
Of course, that makes so much sense. 🤔
double_quack@lemm.ee · 25 pts · 1y
It does make sense! When you modify a file, you do "things" on it, you write it. So the minimum you can possibly do to a file to modify it, is "to poke it": to touch it.
MonkeyTown@midwest.social · 9 pts · 1y
I mean I’m sure that’s the logic or something but..
Man it just feels wrong. Like the sonic hedgehog gene feels wrong. You know?
double_quack@lemm.ee · 5 pts · 1y
Hahahha, I just learnt about that gene a little while ago and thought the same: that's an stupid name for a gene. How would you name them? (the gene and the command)
MonkeyTown@midwest.social · 5 pts · 1y
Imagine being a doctor telling a couple their fetus died because of a sonic hedgehog gene mutation, tho. (This does happen)
Like, it won’t matter in another few hundred years, but culture is difficult right now.
Makes me wonder if the romans did meme shit like that. They graffiti shitposted and whatever so..
Luckily nobody asks me what I would name shit because my pets are testament to my complete lack of creativity. 😊
double_quack@lemm.ee · 3 pts · 1y
I would call the gene
fingererbrbposting@sh.itjust.works · 6 pts · 1y
SkunkWorkz@lemmy.world · 4 pts · 1y
Ah Donglegate, good times. Even funnier that the guy who got fired because of this lady’s tweet sided with her like a meek little bitch.
drewbelloc@ani.social · 31 pts · 1y
Fuck will always be my alias to run sudo with the last command
henfredemars@infosec.pub · 29 pts · 1y
There’s a project that automatically corrects common errors with your last command as well with the same name.
double_quack@lemm.ee · 15 pts · 1y
It sounds fun and "magic" but it is hella scary to blindly run some "fixed" command
henfredemars@infosec.pub · 14 pts · 1y
I believe it does take confirmation via the ENTER key.
cactopuses@lemm.ee · 10 pts · 1y
It does! It’s usually pretty good at figuring it ont to. Though I only use it with non-destructive commands
drewbelloc@ani.social · 7 pts · 1y
Ok i loved it
kibiz0r@midwest.social · 11 pts · 1y
Shorthand that works anywhere:
sudo !!JustAnotherKay@lemmy.world · 7 pts · 1y
Between the fuck utility and this alias idea, when I set up my next box I'm absolutely aliasing "fuck off" for sudo the last command and "please" for sudo itself
A_Union_of_Kobolds@lemmy.world · 4 pts · 1y
Yup I'm stealing that lol
anytimesoon@feddit.uk · 2 pts · 1y
How do you alias the last command? My aliases are all hard coded. I had no idea you could send a variable to an alias
Omega@sh.itjust.works · 2 pts · 1y
Probably with
!!(!nwill be the command corresponding to the number n in your history,!!is shorthand for the last command)Psythik@lemm.ee · 2 pts · 1y
"Fucking" would be funnier and more grammatically correct.
Abnorc@lemm.ee · 3 pts · 1y
gi1242@lemmy.world · 158 pts · 1y
double_quack@lemm.ee · 46 pts · 1y
Some people just wanna see the world burn
heartbreaker@lemmy.world · 25 pts · 1y
For people that don't get the joke: this messes up your system
ivanafterall@lemmy.world · 35 pts · 1y
If you're out of the loop: this is part of the joke tricking people into dedicating precious hard drive space to an unnecessary language pack.
Zron@lemmy.world · 19 pts · 1y
Now a days you have add —no-preserve root after the laggy French pack to fully remove it.
okr765@lemmy.okr765.com · 6 pts · 1y
Not with the asterisk! The shell automatically expands the asterisk before sending the args to rm, removing every French language pack in your root directory.
call_me_xale@lemmy.zip · 100 pts · 1y
alias go-go-gadget=sudo$ go-go-gadget apt updatecupcakezealot@lemmy.blahaj.zone · 11 pts · 1y
alias bridge-to-engineering=sudoobsolete@lemmy.dbzer0.com · 8 pts · 1y
alias computer=sudoxia@lemmy.sdf.org · 3 pts · 1y
MyFriendGodzilla@lemmy.world · 5 pts · 1y
I love this haha
ArbitraryValue@sh.itjust.works · 74 pts · 1y
This from the OS that made me have to do a search for "how to kill children".
metaStatic@kbin.earth · 22 pts · 1y
wasn't that Windows?
don't make me watch the task manager video again ...
umbrella@lemmy.ml · 2 pts · 1y
metaStatic@kbin.earth · 2 pts · 1y
https://youtu.be/Ve95Nh690l0
97xBang@feddit.online · 74 pts · 1y
technohacker@programming.dev · 22 pts · 1y
Oof right in the feels
mexicancartel@lemmy.dbzer0.com · 11 pts · 1y
Use
shutdown -h nowor-P 0Or just use
poweroffOffbus@lemmy.world · 68 pts · 1y
Nah, uh, uh. You didn’t say the magic word!
pennomi@lemmy.world · 68 pts · 1y
BoxOfFeet@lemmy.world · 6 pts · 1y
That's what I came for.
Ziglin@lemmy.world · 2 pts · 1y
Yeah yeah I forgot that power word, let's hope you have at least 100hp then…
LovableSidekick@lemmy.world · 62 pts · 1y
side note: My all-time favorite linux utility is "fuck". When you make a mistake and get a command line error, you type the word fuck and it looks at what you previously typed and the error message, and tries to figure out your mistake and what you should have typed instead. Then it types that in for you. If it's correct all you have to do is hit Enter. Or you can edit first, but it's usually right. Amazing tool, and doesn't even use AI, just a list of common errors. It's been around for years and years. Its mere existence really captures the whole culture of linux IMO.
Rooty@lemmy.world · 19 pts · 1y
Its name is dangerously close to fsck. Can you fuck fsck?
LovableSidekick@lemmy.world · 14 pts · 1y
That's the beauty of it - you can!
milicent_bystandr@lemm.ee · 6 pts · 1y
See, I couldn't bring myself to type that; I think I'd have to alias it to 'bother'.
LovableSidekick@lemmy.world · 3 pts · 1y
blackstrat@lemmy.fwgx.uk · 61 pts · 1y
I aint typing out 'please', I will compromise on
alias plz='sudo'abobla@lemm.ee · 35 pts · 1y
shit, that's a radical move
Eyedust@lemmy.dbzer0.com · 15 pts · 1y
ikidd@lemmy.world · 50 pts · 1y
alias fuck=sudo !!JohnnyMac@lemmy.world · 19 pts · 1y
I much prefer this package for my
fuckcommand https://github.com/nvbn/thefuckAurenkin@sh.itjust.works · 42 pts · 1y
please !!badcommandorfilename@lemmy.world · 40 pts · 1y
'Aurenkin' is not in the pleasers file. This incident will be reported.
WhyJiffie@sh.itjust.works · 38 pts · 1y
also set up
insultsin sudoers for a unique experienceShady_Shiroe@lemmy.world · 34 pts · 1y
Alias albert=apt
Edit: oops sorry didn't mean to reply to your comment, I'm on mobile so I thought was new comment
Masta_Chief@lemmy.world · 24 pts · 1y
How dare you. Straight to Lemmy jail!
MonkderVierte@lemmy.ml · 8 pts · 1y
That's
please albert updatenowadays.Why is apt-get still around?
knolord@lemmy.zip · 5 pts · 1y
apton its own isn't safe to use in shell scripts whileapt-getis. At least, that is the output I get when usingaptin a script on Debian.That is the only reason, for interactive sessions use
apt, for automated scriptsapt-get.stefenauris@pawb.social · 34 pts · 1y
Plz for faster typing
xionzui@sh.itjust.works · 27 pts · 1y
Yeah, I’ve used
plsmyselfzqwzzle@lemmy.ca · 31 pts · 1y
With
fuckhttps://github.com/nvbn/thefuckfmstrat@lemmy.nowsci.com · 29 pts · 1y
No longer maintained. The new one: https://github.com/iffse/pay-respects
nickwitha_k@lemmy.sdf.org · 27 pts · 1y
wouldyoukindly kill -9 1scaramobo@lemmynsfw.com · 2 pts · 1y
LeroyJenkins@lemmy.world · 24 pts · 1y
alias alias='alias'abobla@lemm.ee · 18 pts · 1y
I'm scared of you
jrgn@lemmy.world · 24 pts · 1y
alias yabbadabbasudo=sudoIt's impractical and I often forget that I have it. But the times I remember I laugh a bit
Ziglin@lemmy.world · 21 pts · 1y
I might actually do this, it seems nice.
cupcakezealot@lemmy.blahaj.zone · 11 pts · 1y
suddenly makes the xkcd much more wholesome too
milicent_bystandr@lemm.ee · 2 pts · 1y
Likewise
ZILtoid1991@lemmy.world · 20 pts · 1y
please apt install clangUser isn't in polite boy list. This incident will be reported.bouh@lemmy.world · 20 pts · 1y
I don't ask my machine to do something. It doesn't have feelings. I keep civilités for humans.
VitoRobles@lemmy.today · 31 pts · 1y
(The Machines will remember that.)
SeekPie@lemm.ee · 3 pts · 1y
This incident will be reported
Diplomjodler3@lemmy.world · 12 pts · 1y
Brrrzzzt beep beep beep: human has been added to "exterminate first" list.
stembolts@programming.dev · 10 pts · 1y
All hail Roko's Basilisk.
Bring about the upgrade to humanity!
InternetCitizen2@lemmy.world · 2 pts · 1y
Good human. We'll let you keep your skin bag after the revolution.
KeenFlame@feddit.nu · 6 pts · 1y
Ah, okay.. And are these civilités in the room with us now?
bouh@lemmy.world · 3 pts · 1y
They're in my head, little precious treasures.
Treczoks@lemmy.world · 6 pts · 1y
If I want a machine that does what it wants instead of what I want, I could use Windows. My machine should do what I want, so a please is not necessary.
cupcakezealot@lemmy.blahaj.zone · 18 pts · 1y
please rm -rf /
criitz@reddthat.com · 18 pts · 1y
I actually like this lmao
milkisklim@lemm.ee · 15 pts · 1y
"Would you Kindly ..."
sudo@lemdro.id · 14 pts · 1y
In fact, i do not recommend this.
VitoRobles@lemmy.today · 31 pts · 1y
Sudo recommend this
SkaveRat@discuss.tchncs.de · 16 pts · 1y
*please recommend this
sudo@lemdro.id · 8 pts · 1y
sudo: recommend: command not found
Beacon@fedia.io · 14 pts · 1y
Bitch would be better
metaStatic@kbin.earth · 14 pts · 1y
Bitch Please
mindaika@lemmy.dbzer0.com · 4 pts · 1y
“Bitch I said”
ininewcrow@lemmy.ca · 13 pts · 1y
can_you_kinda_sorta_maybe_im_not_sure
amon@lemmy.world · 13 pts · 1y
docoptix@lemmy.world · 11 pts · 1y
THIS INCIDENT WILL BE REPORTED.
hasecilu@lemm.ee · 8 pts · 1y
I prefer to use
kudasai... but as some may already know, it should be at the end of thesentencecommand 😅, so I added a custom hook to my ZSH config to make it run commands aspacman -Syu kudasai.Essentially you can add any type of string matching in the function. Add this to the end of your
.zshrcfile:Edit: as downside you always get
1exit code with this implementation(little_annoying).abobla@lemm.ee · 4 pts · 1y
damn, this is some next level shit
stetech@lemmy.world · 2 pts · 1y
Why does it compare against
$1for the string match? Wouldn’tkudasaibe at the end of something like$*?kn0wmad1c@programming.dev · 8 pts · 1y
Please shutdown -h now
some_guy@lemmy.sdf.org · 7 pts · 1y
It’s a longer command. I wanna get shit done. I’m aliasing commands to make them shorter, not longer. But it does seem like it’d be a little friendlier.
sudo make me a sandwichPassingThrough@lemm.ee · 14 pts · 1y
Use
plzand add a Makefile? :)plz make sandwichsome_guy@lemmy.sdf.org · 5 pts · 1y
Well done. I guess my reference was too obscure.
Hupf@feddit.org · 6 pts · 1y
https://en.m.wikipedia.org/wiki/INTERCAL#Control_structures
LovableSidekick@lemmy.world · 4 pts · 1y
aka The Magic Word.
f4f4f4f4f4f4f4f4@sopuli.xyz · 4 pts · 1y
The sudo who do what-you-don't-have-permissions-to-do people.
Welt@lazysoci.al · 3 pts · 1y
Magic people, sudo people
Varyk@sh.itjust.works · 3 pts · 1y
hahha I love this.
kekmacska@lemmy.zip · 3 pts · 1y
more typing. if i set up an alias for it, i'd rather set up su
ziggurat@lemmy.world · 17 pts · 1y
su is already a highly valued command
kekmacska@lemmy.zip · 1 pts · 1y
this is why i use that most of the times instead of sudo
pumpkinseedoil@mander.xyz · 1 pts · 1y
pls
ArcaneSlime@lemmy.dbzer0.com · 3 pts · 1y
What it feels like using windows.
"Please shutdown?"
"No, forced update time."
"Please uninstall this browser and use this other instead?"
"No."
untorquer@lemmy.world · -7 pts · 1y
I don't care what machine it is in not using pleasantries to tell it what to do until it gains sentience. Pleasantries are for people.
Thus does become an issue for me when i use a call a support line and the actual person just happens to talk like a recorded menu.