Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Z shell

From Wikipedia, the free encyclopedia
Unix shell
Z shell
Screenshot of a Zsh session
Original author(s)Paul Falstad[1]
Developer(s)Peter Stephenson, et al.[1]
Initial release1990; 35 years ago (1990)
Stable release
5.9[2] Edit this on Wikidata / 14 May 2022; 2 years ago (14 May 2022)
Repository
Written inC
Operating systemCross-platform
TypeUnix shell
LicenseMIT-Modern-Variant[3][4]
Websitezsh.org

TheZ shell (Zsh) is aUnix shell that can be used as aninteractive loginshell and as acommand interpreter forshell scripting. Zsh is an extendedBourne shell with many improvements, including some features ofBash,ksh, andtcsh.

Zsh was created by Paul Falstad in 1990 while he was a student atPrinceton University. It combines features from bothksh andtcsh, offering functionality such as programmablecommand-line completion, extended fileglobbing, improved variable/array handling, and themeableprompts.

Zsh is available forMicrosoft Windows as part of theUnxUtils collection and has been adopted as the default shell formacOS andKali 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.

History

[edit]

Paul Falstad wrote the first version of Zsh in 1990[5] while a student atPrinceton University.[6] The namezsh derives from the name ofYale professor Zhong Shao (then a teaching assistant at Princeton University) – Paul Falstad regarded Shao'slogin, "zsh", as a good name for a shell.[7][8]

Zsh was at first intended to be a subset ofcsh for theAmiga, 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".[9]

Zsh is available forMicrosoft Windows as part of theUnxUtils collection ofnativeWin32ports of commonGNU Unix-like utilities.[10]

In 2019,macOS Catalina adopted Zsh as the default login shell, replacing theGPLv2 licensed version ofBash,[11] and when Bash is run interactively on Catalina, a warning is shown by default.[12]

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

Features

[edit]
Z shell's configuration utility for new users
Zsh with Agnoster theme running onKonsole terminal emulator

Features include:[14]

  • Programmablecommand-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 ofcommand history among all running shells
  • Extendedfile globbing allows file specification without needing to run an external program such asfind
  • Improvedvariable/array handling (non-zero-based numbering)
  • Editing of multi-line commands in a single buffer
  • Spelling correction andautofill of command names (and optionally arguments, assumed to be file names)
  • Various compatibility modes, e.g. Zsh can pretend to be aBourne shell when run as/bin/sh
  • Themeableprompts, 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: fullTCP andUnix domain socket controls, anFTP client, and extended math functions.
  • The built-inwhere command. Works like thewhich 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.[15] The intent of loading functions as separate file is also to support function features across different zsh versions.

Community

[edit]
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, theirGitHub 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.[16]

See also

[edit]

References

[edit]
  1. ^ab"The Z Shell Manual" (Version 5.8.1). Sourceforge.io. July 21, 2012.Archived from the original on February 20, 2018. RetrievedMarch 29, 2022.
  2. ^"zsh 5.9 released".
  3. ^"zsh / Code / [281031] /LICENCE". Paul Falstad.Archived from the original on March 2, 2021. RetrievedFebruary 7, 2015.
  4. ^"MIT License Modern Variant".
  5. ^"zsh - a ksh/tcsh-like shell (part 1 of 8)". alt.sources. December 14, 1990. RetrievedSeptember 18, 2012.
  6. ^"Z-Shell Frequently-Asked Questions". Sourceforge.net. February 15, 2010.Archived from the original on March 2, 2021. RetrievedSeptember 18, 2012.
  7. ^"The Z-Shell (ZSH) Lovers' Page". Guckes.net. c. 2004.Archived from the original on May 17, 2017. RetrievedOctober 2, 2012.
  8. ^"Zsh Mailing List Archive". Zsh.org. August 8, 2005.Archived from the original on March 2, 2021. RetrievedOctober 2, 2012.
  9. ^"zsh 1.0 announcement".GitHub. 15 April 2021.
  10. ^"Native Win32 ports of some GNU utilities".Archived from the original on 2006-02-09. Retrieved2020-07-25.
  11. ^Warren, Tom (June 4, 2019)."Apple replaces bash with zsh as the default shell in macOS Catalina".The Verge.Archived from the original on June 10, 2019. RetrievedJune 13, 2019.
  12. ^"Use zsh as the default shell on your Mac - Apple Support".Archived from the original on 2 December 2019. Retrieved1 July 2019.
  13. ^"Kali Linux 2020.4 Release (ZSH, Bash, CME, MOTD, AWS, Docs, Win-KeX & Vagrant) | Kali Linux Blog".Kali Linux. Retrieved2021-03-03.
  14. ^"Z-Shell Frequently-Asked Questions".zsh.sourceforge.net.Archived from the original on 2021-03-02. Retrieved2020-03-04.
  15. ^Unix power tools (3 ed.). Sebastopol (Calif.): O'Reilly. 2003.ISBN 978-0-596-00330-2.
  16. ^"ohmyzsh Github".GitHub.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Z_shell&oldid=1282374115"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp