7 ms·
The biggest screw up is that fish is not bash compatible. I'm just too used to bash and am not willing to change that because there are corporate systems where
by rany_ 3y ago
The biggest screw up is that fish is not bash compatible. I'm just too used to bash and am not willing to change that because there are corporate systems where I only have access to bash and nothing else; and cannot install fish.
It will just be hurtful to need to keep switching between different scripting languages; I will never be able to do so comfortably and with muscle memory.
- erikpukinskis 3y agoI don’t follow… could you put #!/bin/bash at the top of your scripts, and still use it for scripting, but then use fish as your interactive shell?
- mcpackieh 3y agoI think this is what most fish users do. I suspect that failing to understand this is possible, due to not understanding how shebang scripts are executed by the kernel, is a major reason why bash remains popular for interactive use.
- joseph 3y agoIt's not that. We don't want to switch shell syntax between workstation and server, for example. The fish users I've known moved very slowly when they had to hop on a server, or build a new container image where it involved a 'docker run' into the shell to test it out. If you know bash or sh well enough to do those things quickly then there is no incentive to use fish.
- mcpackieh 3y agoBut `docker run` is the same in every shell. The only things that really change is the syntax for looping over files, advanced globing, things like that. Control-R, tab completion etc all works more or less the same with some minor quirky differences, but nothing that would slow somebody down. Context: I used bash for about 5 years, zsh for the next 10 before switching to fish.
- nimih 3y ago> If you know bash or sh well enough to do those things quickly then there is no incentive to use fish. I honestly think you might misunderstand why a lot of people use fish. I know bash “pretty well”—I’ve written and maintained my fair share of complex bash scripts, and remain pretty comfortable opening a shell in a running docker container or EC2 instance to debug various nonsense. What makes fish attractive to me for use as my login shell is the creature comforts which are very nice to have on my regular workstation, but aren’t really necessary when mucking around in some random environment: syntax highlighting, tab completion/autosuggestion/history search which “just works”, somewhat nicer syntax for writing simple scripts for personal use, saner word splitting, and so on. I guess I can’t really speak for other fish users and am perhaps biased by learned bash first a couple decades ago, but I don’t personally find it especially burdensome to have to remember multiple shell syntaxes/semantics (I already use half a dozen in my day to day work; what’s one more?), and I view it as a reasonable price to pay for a UI I find much more pleasant on whole.
- rany_ 3y agoNo, I mean creating some kind of quick program from the prompt itself. Like for instance bulk renaming of files from the prompt, there is no way I could do that quickly in fish's language and having to switch to bash to do that would be unnecessarily slow. Might as well stick to bash. What I mean to say is that fish would hurt my productivity rather than boost it.
- em-bee 3y agolearning any new tool takes a bit of time. but i believe you are overestimating the effort it takes to learn fish syntax. it is not that hard. you also need to consider the features in fish that boost your productivity that don't need to be learned at all. just give it a try.
- RulerOf 3y agoThis is the reason I was amenable to making the jump to zsh. With the customizations I have in my shell, my bash startup times were creeping into the multi-second territory, but I got a better UX and faster shell startup without having to learn new syntax for simple shell loops.
- stealthypoo 3y agoI haven’t found much need to swap due to using bass https://github.com/edc/bass https://github.com/edc/bass
- em-bee 3y agoi use fish for interactive work and bash for scripting. if there is a script that i don't want to write in bash, then i use a real programming language like python or ruby.
- bin_bash 3y agoas long as you're not doing conditionals and loops you probably won't be able to tell you're not using bash personally I almost never put anything that complicated into my shell, once it gets to that point it goes into a script.
- akho 3y agoThat's not a screwup, that's the point of fish. You can't make a sane shell scripting language without dropping POSIX compatibility.
- rany_ 3y agoI don't believe that's the goal they set out for themselves; and besides I feel like it should at least be as POSIX compatible as they could make it. They could drop POSIX oddities where they see fit, but POSIX is not all insane. I mean, I really doubt that the `export` command is terrible somehow. In fish, you have to use `set -Ux` which is just ridiculous and petty of them, the world doesn't revolve around the fish developers and this just breaks many files that you try to source from fish; for example, Python venv activation scripts. As for why I don't think that's their goal, just look at https://fishshell.com/ https://fishshell.com/ not one of the listed features requires them to drop POSIX compatibility entirely. I just want something like fish shell that isn't too radical and tries to be as POSIX compatible as possible while adding their improvements, out of the box (so ZSH doesn't count).
- akho 3y ago> As for why I don't think that's their goal, just look at https://fishshell.com/ https://fishshell.com/ not one of the listed features requires them to drop POSIX compatibility entirely. “Sensible scripting” is right there.