Fish rules (piefedimages.s3.eu-central-003.backblazeb2.com)
submitted 1 year ago by to c/linuxmemes@lemmy.world
 

fish, the friendly interactive shell, is a commandline shell intended to be interactive and user-friendly.

fish is intentionally not fully POSIX compliant, it aims at addressing POSIX inconsistencies (as perceived by the creators) with a simplified or a different syntax. This means that even simple POSIX compliant scripts may require some significant adaptation or even full rewriting to run with fish.

Source

"How it feels using a posix non compliant shell" Picture of a pug with a cappy, a golden chain and sunglasses
you are viewing a single comment's thread
view the rest of the comments
[–] 16 points 1 year ago (8 children)

I HIGHLY recommend using bash and zsh as posix-compliant shells at the beginning

Why? All the usual shell scripts don't use Fish as interpreter.

  • source
  • parent
  • hideshow 8 child comments
  • [–] 3 points 1 year ago (7 children)

    No posix compliance is a headache. (Where the hell are my aliases!?) And also most scripts need to be executed in a posix-compliant shell.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 17 points 1 year ago* (1 child)

    Most scripts need to be executed in a posix-compliant shell

    Simple. Just add #!/bin/bash to the start of your script and call it a day.

    Or use #!/usr/bin/env bash if you're goated with the sauce. This won't work if you're not goated with the sauce.

    Those who are goated with the sauce know what's up.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 7 points 1 year ago* (3 children)

    why use aliases (they exist in fish) when you can use abbreviations and your history isnt determined by whatever you set your aliases up as? If you change an alias, your history does not reflect that. If you use abbreviations, your history is perfectly usable

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 1 year ago (2 children)

    The fuck is an abbreviation? Is it a knock-off alias?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 11 points 1 year ago* (1 child)

    basically a text expansion. I have g=git, so when I type "g push" after I hit space after g, it expands it to git in the terminal as if i just typed out git myself. My history doesnt show "g push" it shows "git push" before I push enter

    https://fishshell.com/docs/current/cmds/abbr.html

  • source
  • parent
  • hideshow 1 child comment