Scripting in fish is so much better than bash, holy. Reduced my scripts’ LOC by probably 50% and made them actually legible when coming back to them 6 months later. I converted all my personal scripts from bash to fish.
I dislike heavily how flow control works on it, and the lack of indication where it starts to where it ends, the function layout, not to mention attempting to pipe anything via it. This combined with the fact that it’s a lesser used shell and as such has less of a presence online to research made it not worth the time and effort to actually use it. I swapped to ZSH which at least maintains a large POSIX compliance which makes it easier to share the scripts as well and also supports adding many of fish’s features.
It may be nicer to read but, actually getting established, learning it, using it and then maintaining compatibility with other programs and scripts when using it, just made it not worth it. I have better things to do with my free time then to try and fight a shell every step of the way to make it look cleaner.
You mean its if and switch statements? For and while loops? Just like bash and zsh has?
the lack of indication where it starts to where it ends
You mean the end keyword? The start of things should be clear enough. Keywords are used for them depending on what you’re starting. I like the fact that everything ends with the same keyword. Much simpler.
the function layout, not to mention attempting to pipe anything via it
Piping something “via the function layout”? I’m not even sure what that means. I’d love to know more if you would.
maintaining compatibility with other programs and scripts when using it, just made it not worth it
This should be fully transparent. It’s a shell. I switched all my scripts to fish, and my integration with my desktop environment was completely unchanged. It’s just text in and text out.
I have better things to do with my free time th[a]n to try and fight a shell every step of the way to make it look cleaner.
I mean… It took me like an hour to read through the documentation, and all the syntax is so small you can memorize the entire language.
It comes with a nice web based documentation built in. And all the built-in commands have their own man page for easy reading, compared to the jumbled mess of zsh’s docs. I could never find a goddamn thing in zsh’s two handfuls of different man pages. Nothing was where I thought it would be.
It kind of sounds like you were fighting fish rather than it fighting you, every step of the way. That sounds absolutely crazy compared to my experience.
My experience with fish is that I finally understood what my shell was doing and how it works, compared to zsh. I even understood what bash was doing. zsh, no. And all these files it was leaving around my home directory.
What I will concede is that you should not convert your shell scripts if you need portability. If your scripts will be on multiple computers, fish is a bad idea if you don’t control them all.
Otherwise it feels like some other issue is bigger here, because fish is so much simpler. Coming from me who’s been scripting in bash and zsh for about 20 years, and zsh is the only one that has stumped me, and whose documentation I’ve been struggling with. Even bash’s is better. 💀
You mean its if and switch statements? For and while loops? Just like bash and zsh has?
No i mean the flow in general. It’s ugly and not transparent when compared to bash or any other language
the lack of indication where it starts to where it ends
Yes and no, I mean how it chooses to start and end, there is no punctuation, it seems to emulate a tab oriented language without being a tab oriented language.
Piping something “via the function layout”? I’m not even sure what that means. I’d love to know more if you would.
Two separate complaints, I dislike how they manage functions (but yes bash does similar on this case). Piping and redirecting are badly implemented and what would be an accepted pipe in ZSH or Bash will fail in fish. I made a script that had to pipe a file via wget and it wouldn’t function unless I used a pager which wasn’t needed in Bash or Zsh and wasn’t documented as a requirement anywhere on their piping or redirection documentation. Took me almost an hour of troubleshooting why the command was failing and how to fix it due to it.
I mean… It took me like an hour to read through the documentation, and all the syntax is so small you can memorize the entire
language.
Maybe this has changed since I last tried about a year or two ago, but last time I tried to read the documentation it sucked hardcore and lacked examples of more advanced parts of the shell.
It kind of sounds like you were fighting fish rather than it fighting you, every step of the way. That sounds absolutely crazy compared to my experience.
I would rather take the path of least resistance for a program, with fish it had way too much resistance trying to use it, so I went to the path that had a lesser resistance, which was ZSH, and then just proceeded to add fish’s core capabilities to zsh. This let me use a scripting language that has a lot of documentation and examples to assist in learning, while having the benefits of the shell. Plus it lets me actually share the scripts with friends because it’s already hard to find someone on linux, and its even moreso difficult to find someone who uses fish shell.
the flow in general. It’s ugly and not transparent when compared to bash or any other language
Could you give a single example of this “ugly” and not “transparent” control flow, so I can compare it to bash? I’m having a hard time relating to those subjective and fuzzy adjectives. To me, fish is more clear by a mile. And that is the opinion of someone who has been scripting proficiently in bash for almost two decades, and in fish for like two years. So I’m super curious what you mean, specifically.
Is this possibly a question of bias? You are used to bash-like syntax and weren’t really open to, excited about, or even neutral to fish to begin with? Could that have been a factor?
how it chooses to start and end, there is no punctuation, it seems to emulate a tab oriented language
I don’t get this. Everything that starts a block of statements or control flow is a statement in itself, like function, or if. You can do the next statement on the next line, or add punctuation (;) and add the next statement on the same line. Just like bash.
What’s weird, I always thought, was that bash had these weird, required, extra statements that are needed, like then, and do, etc. Those are ugly to me, and make no sense when you think about it for a little bit. They are excessive and unneeded. The first keyword indicates the start of the thing, by itself. Really simple, and a good design choice IMO. Fewer LOC, less verbosity, without being too terse and sacrificing legibility but only increasing it.
Piping and redirecting are badly implemented
it wouldn’t function unless I used a pager which wasn’t needed in Bash
Super curious about this scenario. Piping isn’t different in fish. You just pipe output to an input. So yeah, very curious about this specific case.
Scripting in fish is so much better than bash, holy. Reduced my scripts’ LOC by probably 50% and made them actually legible when coming back to them 6 months later. I converted all my personal scripts from bash to fish.
What makes it “obnoxious”??
I dislike heavily how flow control works on it, and the lack of indication where it starts to where it ends, the function layout, not to mention attempting to pipe anything via it. This combined with the fact that it’s a lesser used shell and as such has less of a presence online to research made it not worth the time and effort to actually use it. I swapped to ZSH which at least maintains a large POSIX compliance which makes it easier to share the scripts as well and also supports adding many of fish’s features.
It may be nicer to read but, actually getting established, learning it, using it and then maintaining compatibility with other programs and scripts when using it, just made it not worth it. I have better things to do with my free time then to try and fight a shell every step of the way to make it look cleaner.
You mean its if and switch statements? For and while loops? Just like bash and zsh has?
You mean the
endkeyword? The start of things should be clear enough. Keywords are used for them depending on what you’re starting. I like the fact that everything ends with the same keyword. Much simpler.Piping something “via the function layout”? I’m not even sure what that means. I’d love to know more if you would.
This should be fully transparent. It’s a shell. I switched all my scripts to fish, and my integration with my desktop environment was completely unchanged. It’s just text in and text out.
I mean… It took me like an hour to read through the documentation, and all the syntax is so small you can memorize the entire language.
It comes with a nice web based documentation built in. And all the built-in commands have their own man page for easy reading, compared to the jumbled mess of zsh’s docs. I could never find a goddamn thing in zsh’s two handfuls of different man pages. Nothing was where I thought it would be.
It kind of sounds like you were fighting fish rather than it fighting you, every step of the way. That sounds absolutely crazy compared to my experience.
My experience with fish is that I finally understood what my shell was doing and how it works, compared to zsh. I even understood what bash was doing. zsh, no. And all these files it was leaving around my home directory.
What I will concede is that you should not convert your shell scripts if you need portability. If your scripts will be on multiple computers, fish is a bad idea if you don’t control them all.
Otherwise it feels like some other issue is bigger here, because fish is so much simpler. Coming from me who’s been scripting in bash and zsh for about 20 years, and zsh is the only one that has stumped me, and whose documentation I’ve been struggling with. Even bash’s is better. 💀
No i mean the flow in general. It’s ugly and not transparent when compared to bash or any other language
Yes and no, I mean how it chooses to start and end, there is no punctuation, it seems to emulate a tab oriented language without being a tab oriented language.
Two separate complaints, I dislike how they manage functions (but yes bash does similar on this case). Piping and redirecting are badly implemented and what would be an accepted pipe in ZSH or Bash will fail in fish. I made a script that had to pipe a file via wget and it wouldn’t function unless I used a pager which wasn’t needed in Bash or Zsh and wasn’t documented as a requirement anywhere on their piping or redirection documentation. Took me almost an hour of troubleshooting why the command was failing and how to fix it due to it.
Maybe this has changed since I last tried about a year or two ago, but last time I tried to read the documentation it sucked hardcore and lacked examples of more advanced parts of the shell.
I would rather take the path of least resistance for a program, with fish it had way too much resistance trying to use it, so I went to the path that had a lesser resistance, which was ZSH, and then just proceeded to add fish’s core capabilities to zsh. This let me use a scripting language that has a lot of documentation and examples to assist in learning, while having the benefits of the shell. Plus it lets me actually share the scripts with friends because it’s already hard to find someone on linux, and its even moreso difficult to find someone who uses fish shell.
Could you give a single example of this “ugly” and not “transparent” control flow, so I can compare it to bash? I’m having a hard time relating to those subjective and fuzzy adjectives. To me, fish is more clear by a mile. And that is the opinion of someone who has been scripting proficiently in bash for almost two decades, and in fish for like two years. So I’m super curious what you mean, specifically.
Is this possibly a question of bias? You are used to bash-like syntax and weren’t really open to, excited about, or even neutral to fish to begin with? Could that have been a factor?
I don’t get this. Everything that starts a block of statements or control flow is a statement in itself, like
function, orif. You can do the next statement on the next line, or add punctuation (;) and add the next statement on the same line. Just like bash.What’s weird, I always thought, was that bash had these weird, required, extra statements that are needed, like
then, anddo, etc. Those are ugly to me, and make no sense when you think about it for a little bit. They are excessive and unneeded. The first keyword indicates the start of the thing, by itself. Really simple, and a good design choice IMO. Fewer LOC, less verbosity, without being too terse and sacrificing legibility but only increasing it.Super curious about this scenario. Piping isn’t different in fish. You just pipe output to an input. So yeah, very curious about this specific case.