Re:Ask HN: Which tools have made you a much better programmer?
by aryc19 on Wednesday June 10, 2020 @01:12AM
(#23474170)
What benefits do you see in fish when compared to zsh?
[ Parent
| on HN ]
Re:Ask HN: Which tools have made you a much better programmer?
by artemisart on Wednesday June 10, 2020 @05:06AM
(#23475233)
I would say fish is to zsh like what zsh is to bash.
More seriously, for a start: good defaults, highlighting and autosuggestion built-in, parameters search with help and completion... (but it's not Posix).
Re:Ask HN: Which tools have made you a much better programmer?
by rovr138 on Wednesday June 10, 2020 @07:16AM
(#23475843)
Regarding POSIX, I've been using Fish for about 4 years now.
POSIX always comes up, how it's a deal breaker.I want to mention that I build all my scripts as POSIX as I can or using Bash extensions. You keep having Bash/ZSH on your machine, so you can still use your scripts and don't miss anything. Shebang's keeps working,
#!/bin/sh
#!/bin/bash
#!/bin/zsh
Personally, I actually don't change my default shell (chsh step). I simply set my terminal to use the fish command instead of invoking the default shell. - Gnome Terminal, there's a Title and Command tab. You can set a custom command there. Just put the path to fish
- Terminal.app, Preferences > Profiles > Shell > Run command
- iTerm.app, Preferences > Profiles > General > Command
- Tmux, on your .tmux.conf `set -g default-shell /usr/local/bin/fish`
It's more portable for me that way.
Re:Ask HN: Which tools have made you a much better programmer?
by takeda on Wednesday June 10, 2020 @10:36AM
(#23477428)
I was also interested about it and from my research, Fish has two major differences:
- it enables the cool functionality out of the box, so unlike zsh you don't need to have large configuration file to enable everything
- it is not afraid to break bash compatibility to fix confusing scripting issues, so fish most likely will fail when executing a bash script, but writing scripts in fish should be more enjoyable