top | item 30734868

(no title)

RobertMiller | 4 years ago

I think POSIX compliance of interactive shells is completely irrelevant. POSIX shells are relevant when you're writing scripts that will be distributed, but there's no reason that needs to be done with the same shell you use interactively. I use fish presently and zsh before that for nearly 15 years, but my shell scripts have always started with #!/bin/sh

It's not like fish installs to /bin/sh, nor are /bin/sh scripts executed using fish just because your interactive shell is fish. I guess these are the two misconceptions the common worries are based on?

discuss

order

Osiris|4 years ago

Same. I've been using fish forever. Scripts that use sh or bash still work fine.

The fish scripting language is much easier to read and write than bash (for someone that doesn't write many scripts). So for local scripts I use it but for anything shared it's still bash scripts.

kytazo|4 years ago

Yeah I agree POSIX compliance is irrelevant in the interactive usage context, the only issue that rose here and there were command substitutions mostly, something which this release takes care of.

The sole reason I was contemplating switching to zsh in regards to POSIX was the fact my shell scripting knowledge is rather shallow and I could perhaps improve it a bit while working on functions I write for personal interactive use.. Needless to say I've written them in fish haha.. If my assumptions are right what I need to master is combining properly the coreutils and the general mentality of piping things from one command to another etc - I could be wrong tho

socialdemocrat|4 years ago

Same here, totally don’t get the whole compatibility argument. If I need to script anything of any complexity I use a more proper programming language anyway such as Python, Ruby, Julia or maybe even Go as it makes distributing apps/scripts real easy.