this post was submitted on 03 Dec 2023
695 points (95.3% liked)

linuxmemes

20839 readers
879 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Sprokes@jlai.lu 19 points 10 months ago (11 children)

Does it work on fish shell?

[–] Knusper@feddit.de 26 points 10 months ago* (last edited 10 months ago) (7 children)

What that garble of symbols does, is that it defines and calls a function named :, which calls itself twice.

The syntax for defining a function is different in Fish, so no, this particular garble will not work:

But it is, of course, possible to write a (much more readable) version that will work in Fish.

[–] ReveredOxygen@sh.itjust.works 21 points 10 months ago (2 children)

you can write a more readable version in any shell, it's intentionally unreadable

[–] Knusper@feddit.de 11 points 10 months ago* (last edited 10 months ago) (1 children)

Yeah, I meant, as an attacker, you couldn't come up with a similarly unreadable version.

At least, as far as I can tell, defining a function requires spelling out function and seems to require being defined on multiple lines, too.

[–] ReveredOxygen@sh.itjust.works 3 points 10 months ago

Oh, I see. That's very nice then

[–] cashews_best_nut@lemmy.world 4 points 10 months ago

Unfortunately it works in zsh. I just had to kill my laptop after curiosity got the better of me.

load more comments (4 replies)
load more comments (7 replies)