Difference Between Fish vs Zsh
Many articles are out there explaining about shell scripting, Bash, Zsh, Fish, and many other types of scripting. Most of the shell scripts basically are the same. They give the same output and share the same scripting environment. But some subtle differences are unique for each of the shell scriptings. Both Fish and Zsh are ranked as best in shell scripting with their way of writing scripts and functions. Also, both are open source tools that anyone can use them freely. Zsh is extended from Bash language, and fish scripting is totally different from Bash or, to be specific, Zsh language.
Head to Head Comparison between Fish vs Zsh (Infographics)
Below are the top 7 comparisons between Fish vs Zsh:
Key differences between Fish vs Zsh
Let us discuss some key differences between Fish vs Zsh in the following points:
- Fish is very easy to understand and install when compared with Zsh. We do not require any Bash commands or interactive Bash scripting to install Fish. Plugins need to be downloaded and kept in a specific folder for the proper functioning of Zsh. While Fish, the easy one without any of these difficulties and disturbances, works well with any system and users.
- The syntax in both languages is different. We cannot say which is easy and which is difficult, but they are different. When more aliases are used in Zsh, Fish just avoid any kind of aliases in the language.
- The main difference to be highlighted here is that Fish does have a characteristic of syntax highlighting and automatic suggestions within the scripting. This helps the users to work with the script in any circumstances and highlight the necessary scripts shown in the language. This makes a Fish script to stand out from any other scripting language. How good it is when the errors are highlighted before even hitting enter in the keyboard? Zsh does not have any of these characteristics, and many Zsh scripters love Fish because of this functionality in the language. But these characteristics can be made available in Zsh by installing some plugins in the system.
- Zsh has many customizable settings that include spelling correction, colour customization, and so on. Context is easily understandable in Zsh, and it fills the scripts by itself in the CLI. When coming to Fish, it is much more customizable than Zsh with its help feature, consistent syntax, and many others. Customizing settings is not a challenge in any of these scripting languages.
- My Fish community was formed based on the relevance from the community Oh my Zsh from Zsh scripting. Both works in a similar way except for some important changes. A web configuration is set up in the Fish scripting system that helps to manage the shell beautifully and aesthetically. This provision is not available in Zsh.
- Also, it easy to search history in Fish scripting with the up and down commands in the scripting language. Duplicate matches are removed automatically that makes the scripting easy. This feature is not available in Zsh, but we can use this with the help of plugins in the language.
- With all these glorifying points of Fish, one thing to note is that Fish scripts are slow, slower than Zsh. Thus, anyone who wants to work with faster scripts can choose Zsh with all the plugins installed.
Comparison Table of Fish vs Zsh
The table below summarizes the comparisons between Fish vs Zsh:
|Aliases are not used. Functions are used to manage the use of aliases.||Both aliases and functions are used in the language, and presenting the scripts is totally different.|
|The scripting is really simple and easy to follow for any beginner. Installing the scripting language is really easy for any users, and all the plugins come as a package.||Anyone can have a basic knowledge of Bash to know and work in Zsh. Installation is not that easy, and all the plugins have to be installed separately after installing the Zsh language.|
|Fish is rightly called as friendly and interactive shell due to its working and interaction with the users. It works perfectly for beginners as well as experienced developers.||Though the interactions of Zsh is easily manageable, we cannot say that Zsh is friendly and as good as Fish in interactions. Automatic suggestions and error corrections do not happen suddenly, and we have to work for the same.|
|Fish has good portability due to its simple configuration setup. We can even install Fish from a repository to a system.||Zsh cannot be installed easily without the support of Bash, and this makes the portability of Zsh less than Fish.|
|The syntax of Fish and Bash are different, and we cannot say that anyone who knows Bash will know Fish for sure. They don’t work similarly.||Anyone who knows Bash can learn Zsh easily because of both works in a similar fashion. Bash is the basic scripting language, and those who are into scripting will know Bash for sure. The scripting which anyone does in their system, in the beginning, is Bash.|
|It has good documentation, and it is easy to start with Fish with the proper explanation given in the documentation.||The documentation is good but not to be compared with Fish. Zsh depends mostly on Bash, and the scripting with documents have to be referred from Bash.|
|Temporary files are not used to save history, which can sometimes be an advantage and other times a disadvantage. The history files cannot be referred to when a need happens, and also, the script will not take up much memory while writing the code.||Temporary files are used in the scripting, and this helps save the scripts, get output from the history, and automatically suggest the scripts to fill the codes. But the memory used is more and grabs more space when more code is written with Zsh in the system.|
Many users have changed from Bash or Zsh to Fish due to its interactive scripting and configuration setup. But the scripts is basically the same, with some pros and cons in both. It is good to understand both and select the relevant language based on our needs.
This is a guide to the top differences between Fish vs Zsh. Here we discuss the key differences of Fish vs Zsh with infographics and a comparison table. You may also have a look at the following articles to learn more –