Z shell

Screenshot of a Zsh session

Original author(s)| Paul Falstad[1]
Developer(s)| Peter Stephenson, et al.[1]
Initial release| 1990; 36 years ago (1990)
Written in| C
Operating system| Cross-platform
Type| Unix shell
License| MIT-Modern-Variant[2][3]
Website| zsh.org

The Z shell (Zsh) is a shell and a command-line interpreter for shell scripts. Zsh mostly maintains the Bourne shell's syntax and behavior, but in its default configuration deviates in some significant ways from the POSIX standard specification of the `sh` language (such as eliminating implicit IFS-splitting and globbing upon unquoted parameter expansions) and adds substantially more features.

Zsh was created by Paul Falstad in 1990 while he was a student at Princeton University. It combines features from both ksh and tcsh (and rc to a lesser extent), offering functionality such as programmable command-line completion, extended file globbing, improved variable/array handling, and themeable prompts.

Zsh is available for most POSIX / Unix-like operating systems as well as Microsoft Windows as part of Cygwin or the UnxUtils collection and has been adopted as the default interactive shell for macOS, Deepin, TrueNAS and Kali Linux. The "Oh My Zsh" user community website provides a platform for third-party plug-ins and themes, featuring a large and active contributor base.

## Contents

* 1 History
* 2 Features
* 3 Community
* 4 See also
* 5 References
* 6 External links

## History

Paul Falstad wrote the first version of Zsh in 1990[4] while a student at Princeton University.[5] The name zsh derives from the name of Zhong Shao, a teaching assistant at Princeton University. Falstad regarded Shao's login, "zsh", as a good name for a shell.[6][7]

Zsh was at first intended to be a subset of csh for the Amiga, but expanded far beyond that. By the time of the release of version 1.0 in 1990 the aim was to be a cross between ksh and tcsh –a powerful "command and programming language" that is well-designed and logical (like ksh), but also built for humans (like tcsh), with all the neat features like spell checking, login/logout watching and termcap support that were "probably too weird to make it into an AT&T product".[8]

Ports of Zsh for Microsoft Windows have been available via Cygwin at least since around 1997[9], and Zsh is supplied as an official Cygwin package[10] since 2002.[11][12] It is also available as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities (though Zsh, unlike Bash is not part of the GNU project itself).[13]

In 2019, macOS Catalina adopted Zsh as the default login shell, replacing the GPLv2 licensed version of Bash,[14] and when Bash is run interactively on Catalina, a warning is shown by default.[15]

The default shell of TrueNAS (formerly FreeNAS) changed from csh to zsh in FreeNAS 11.2 released in late 2018.[16]

In 2020, Kali Linux adopted Zsh as the default shell since its 2020.4 release.[17]

## Features

Z shell's configuration utility for new users Zsh with Agnoster theme running on Konsole terminal emulator

Features include:[18]

* Programmable command-line completion that can help the user type both options and arguments for most used commands, with out-of-the-box support for several hundred commands
* Sharing of command history among all running shells
* Extended file globbing allows file specification without needing to run an external program such as find
* Improved variable/array handling (non-zero-based numbering)
* Editing of multi-line commands in a single buffer
* Spelling correction and autofill of command names (and optionally arguments, presumably file names)
* Various compatibility modes, e.g. Zsh can pretend to be a Bourne shell when run as `/bin/sh`
* Themeable prompts, including the ability to put prompt information on the right side of the screen and have it auto-hide when typing a long command
* Loadable modules, providing among other things: full TCP and Unix domain socket controls, an FTP client, and extended math functions.
* The built-in `where` command. Works like the `which` command but shows all locations of the target command in the directories specified in `$PATH` rather than only the one that will be used.
* Named directories. This allows the user to set up shortcuts such as `~mydir`, which then behave the way `~` and `~user` do.
* Widgets. Both built and implemented by ordinary functions widgets can be bound to hotkeys.
* Function autoloading. A performance optimization for function that might be pre-loaded and run on demand.[19] The intent of loading functions as separate file is also to support function features across different zsh versions.

## Community

Oh My Zsh logo

A user community website known as "Oh My Zsh" collects third-party plug-ins and themes for the Z shell. As of 2024, their GitHub repository has over 2300 contributors, over 300 plug-ins, and over 140 themes. It also comes with an auto-update tool that makes it easier to keep installed plug-ins and themes updated.[20]

## See also

* Comparison of command shells

## References

1. ↑ 1.0 1.1 "The Z Shell Manual". Sourceforge.io. July 21, 2012. https://zsh.sourceforge.io/Doc/Release/Introduction.html#Author.
2. ↑ "zsh / Code / [281031] /LICENCE". Paul Falstad. https://sourceforge.net/p/zsh/code/ci/master/tree/LICENCE.
3. ↑ "MIT License Modern Variant". https://spdx.org/licenses/MIT-Modern-Variant.html.
4. ↑ "zsh - a ksh/tcsh-like shell (part 1 of 8)". alt.sources. December 14, 1990. http://groups.google.com/group/alt.sources/msg/936c7876941058ed.
5. ↑ "Z-Shell Frequently-Asked Questions". Sourceforge.net. February 15, 2010. https://zsh.sourceforge.net/FAQ/zshfaq01.html#l3.
6. ↑ "The Z-Shell (ZSH) Lovers' Page". Guckes.net. c. 2004. http://www.guckes.net/zsh/lover.html.
7. ↑ "Zsh Mailing List Archive". Zsh.org. August 8, 2005. http://www.zsh.org/mla/users/2005/msg00951.html.
8. ↑ "zsh 1.0 announcement". 15 April 2021. https://github.com/llua/zsh-1.0.
9. ↑ "Cygwin mailing list archives". https://cygwin.com/pipermail/cygwin/1997-August/004106.html.
10. ↑ "Cygwin Package Summary for zsh". https://cygwin.com/cygwin/packages/summary/zsh.html.
11. ↑ Castro, Peter. "Cygwin Apps Mailing List archive". https://cygwin.com/pipermail/cygwin-apps/2002-May/005003.html.
12. ↑ Castro, Peter. "Cygwin Mailing List Archive". https://cygwin.com/pipermail/cygwin/2002-May/075990.html.
13. ↑ "Native Win32 ports of some GNU utilities". https://unxutils.sourceforge.net/.
14. ↑ Warren, Tom (June 4, 2019). "Apple replaces bash with zsh as the default shell in macOS Catalina". https://www.theverge.com/2019/6/4/18651872/apple-macos-catalina-zsh-bash-shell-replacement-features.
15. ↑ "Use zsh as the default shell on your Mac - Apple Support". https://support.apple.com/en-us/HT208050.
16. ↑ "FreeNAS 11.2 Documentation - Shell". https://www.ixsystems.com/documentation/freenas/11.2/shell.html.
17. ↑ "Kali Linux 2020.4 Release (ZSH, Bash, CME, MOTD, AWS, Docs, Win-KeX & Vagrant) | Kali Linux Blog" (in English). https://www.kali.org/blog/kali-linux-2020-4-release/.
18. ↑ "Z-Shell Frequently-Asked Questions". https://zsh.sourceforge.net/FAQ/zshfaq01.html.
19. ↑ Unix power tools (3 ed.). Sebastopol (Calif.): O'Reilly. 2003. ISBN 978-0-596-00330-2.
20. ↑ "ohmyzsh Github". https://github.com/ohmyzsh/ohmyzsh.

## External links

* Z shell on SourceForge.net
* Oh My Zsh

* v
* t
* e

Unix shells

* Almquist
* Bash
* Bourne
* csh
* es
* fish
* Hamilton
* Korn
* PWB
* rc
* sash
* tcsh
* Thompson
* Wish
* Zsh

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Z shell. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Z_shell&oldid=4297863"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template