zsh vs Ion (shell)
When comparing zsh vs Ion (shell), the Slant community recommends zsh for most people. In the question“What are the best UNIX shells?” zsh is ranked 2nd while Ion (shell) is ranked 7th. The most important reason people chose zsh is:
When you start typing a command, you can press the tab key and it will complete the command you started typing. If there are multiple potential commands, you can choose which one to run by simply pressing tab again. Case-insensitive by default, too.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Interactive autocompletion
When you start typing a command, you can press the tab key and it will complete the command you started typing. If there are multiple potential commands, you can choose which one to run by simply pressing tab again. Case-insensitive by default, too.
Pro Powerful community-driven tools via oh-my-zsh
Oh-my-zsh is a community-driven framework, which helps users with their zsh configuration and plugins. 400 plugins, 200+ themes and auto-updates to always be up to date.
Pro Autocomplete for options
Zsh intelligently determines if you are trying to complete a file path or an option, and pressing tab after typing -
will reliably bring up a list of options.
Pro Good bash compatibility
Things you've learned using bash will largely apply to zsh. Scripts written in bash will run with little to no modification.
Pro Safer variable behaviour
Unlike Bash, zsh does not split unquoted variables by default, making it less error-prone.
Pro Recursive globbing
ls **/*.log
for example is supported by ZSH.
Pro Great install procedure
Zsh will take you through a procedure which is roughly 30 minutes in length before during install. Through this procedure it asks you to set different options and customize the shell the way you want it to. Most of these settings are also found in other shells, but to customize them you have to go dig configuration files while zsh allows you to do it in the beginning.
Pro Shared histories
If you spend a lot of time in the terminal, most likely you will have several terminal windows open. Zsh has great support for command line histories. The history is unique and shared through all the different instances.
Pro Smart escaping
Zsh can determine the context of the command you're typing in and determine if it should escape characters if you're typing in a URI.
Pro Pipe output to a temporary file:
Some programs don't support loading from stdin, but ZSH can store outputs to a temporary file, example: unzip =(curl http://example.com/someZipFile.zip)
Pro Faster spelling correction
Zsh' s correct (or correctall) is vastly superior to Bash's attempt at spelling correction.
Pro Supports type-checking of assignments
All variable assignments may optionally specify a type, which will enforce that the supplies value is compatible with that type before storing it, returning an error if there's a mis-match.
Pro Features slicing syntax
Arrays are sliced by elements, and strings are sliced by graphemes.
Pro Easy to learn
The entire Rust ecosystem is known for having excellent, modern documentation, and Ion is no exception. Couple that with it having far less cruft (ie fewer things to learn) some syntactic and conceptual inspiration from Rust, and suddenly you have a very easy to learn (and still very powerful) shell.
Pro Distinguishes between arrays and strings
Generally more type-safe, enabling explicitness, and allowing for powerful slicing and method syntax.
Pro Faster than all other system shells
Ion actually manages to be faster than Dash -- simultaneously using less memory and packing much more functionality.
Pro A simple, modern, and clean syntax
Syntax is much simpler than other shells, leading to very elegant and succinct scripts and command invocations.
Pro Written in Rust
Shells written in C are often riddled with memory-based vulnerabilities that lead to high profile security flaws that are continually discovered decades later. GNU Bash's Shellshock vulnerability, for example, is an example of a vulnerability that Rust prevents. Rust raises the bar for minimum code quality standards by enforcing various restrictions on type/variable usage, and therefore Ion provides a high quality code base from the start.
Pro Can be compiled as a static binary
There are no dependencies on C or C libraries (except for the minimum required to run on Linux). By opting for the MUSL target toolchain, a fully static binary can be generated and distributed to systems.
Pro Color namespace with 24-bit color syntax
It is exceptionally easy to use 24-bit colors in the shell with Ion's c/color namespace.
echo ${c::0x09F}Bluish text${c::0x630bg}with a brownish background${c::reset}
Pro Method syntax enables a new level of capabilities
Offers a unique concept of string and array methods, whereby invoking the name of a method, and supplying arguments to it, you can perform otherwise complex text manipulation at expansion time. Also supports recursively processing the results of method expansions within method expansions.
Pro Supports a namespaces concept
A special syntax allows for obtaining values from within special namespaces -- either namespaces that are built into the shell, such as the color namespace, or from plugins, such as the git plugin.
Pro Supports a plugin architecture
Plugins may be integrated within Ion using a C FFI. These plugins can add additional methods and namespaces.
Pro May be used as a library
Ion shell is featured within the distributed Concurr application, by the same author of Ion, which creates embedded instances of the Ion shell in the server for executing commands locally.
Cons
Con Not fully compatible with bash
There is a small chance you may have a bash script that doesn't work in zsh, although this is very very rare and most developers will never run into any issues.
Con Requires a lot of configuration to be used fully
Zsh requires a lot of tinkering with configuration files and downloading plugins in order to be able to do tasks which other shells may be able to do out of the box.
Con Defaults are unfriendly for a long-time bash user
Expect to find a configuration you like (or use the configuration utility) to set reasonable preferences. Default zsh interaction is different enough to make you stutter through what used to be familiar workflows.
Con Still in development
There's a number of paper cuts that have yet to be addressed. It's been progressing very rapidly though. Some features have yet to be implemented, some logic bugs have yet to be fixed, and it's not been tested much in the wild. Very early in it's life as of 2017.
Con Unubiquitous
There's a big advantage to picking a shell which is ubiquitous, since you are likely to work with more than your own systems, and likely want the same or a similar experience there.