Z shellZsh)是一款可用作交互式英語interactive登錄的shell腳本編寫命令解釋器。Zsh對Bourne shell做出了大量改進,同時加入了Bashkshtcsh的某些功能。

Z shell
Zsh會話截圖
Zsh會話截圖
原作者Paul Falstad[1]
開發者Peter Stephenson, et al.[1]
首次發布1990年,​34年前​(1990
當前版本
  • 5.9 (2022年5月14日;穩定版本)[2]
編輯維基數據鏈接
源代碼庫 編輯維基數據鏈接
編程語言C
操作系統跨平臺
類型Unix shell
許可協議MIT-like[3]
網站www.zsh.org/ 編輯維基數據

自2019年起,macOS的預設Shell已從Bash改為Zsh。

起源 編輯

保羅·弗斯塔德(Paul Falstad)於1990年在普林斯頓大學求學時編寫了Zsh的初版[4][5]名稱zsh源於耶魯大學教授邵中(Zhong Shao,後轉為普林斯頓大學教授) — 保羅將教授的用戶名"zsh"作為此Shell的名稱。[6][7]

特性 編輯

 
Z shell向新用戶提供的配置工具

特性包括:

  • 可幫助用戶鍵入常用命令選項及參數的可編程命令行補全功能英語command-line completion,自帶對數百條命令的支持
  • 可與任意Shell共享命令歷史英語command history
  • 可在無需運行外部程序(如find)的情況下通過 文件擴展英語glob (programming)匹配文件
  • 改進變量/數組處理方式
  • 在單緩衝區內編輯多行命令
  • 拼寫檢查
  • 多種兼容模式(例如,Zsh可在運行為/bin/sh的情況下偽裝成Bourne shell
  • 可編程的命令行界面,包括將提示行信息顯示在屏幕右側並在輸入過長指令時自動隱藏的功能
  • 可加載模塊可提供額外支持:完整傳輸控制協議Unix域套接字控制、FTP客戶端及擴展數學函數。
  • 自帶where命令,其與which命令類似,但是顯示指定於$PATH中所指定指令的全部位置,而不是僅顯示所使用指令的位置。
  • 目錄名稱。此功能可讓用戶設置快捷方式,(如~mydir,與~~user的工作方式相似)。

Oh My Zsh 編輯

 
運行於Konsole終端模擬器上使用Agnoster主題的Zsh

用戶社區網站"Oh My Zsh"收集Z shell的第三方插件及主題。[8]截止於2018年,其GitHub源共有超過1000位貢獻者、200多款插件和超過140款主題。同時也帶有更新已安裝插件及主題的自動更新工具。[9]

另請參閱 編輯

參考文獻 編輯

  1. ^ 1.0 1.1 The Z Shell Manual (Version 5.0.0). Sourceforge.net. July 21, 2012 [September 18, 2012]. (原始內容存檔於2018-02-20). 
  2. ^ 2.0 2.1 zsh 5.9 released. 
  3. ^ zsh / Code / [281031] /LICENCE. Paul Falstad. [February 7, 2015]. (原始內容存檔於2021-03-02). 
  4. ^ zsh - a ksh/tcsh-like shell (part 1 of 8). alt.sources. December 14, 1990 [September 18, 2012]. 
  5. ^ Z-Shell Frequently-Asked Questions. Sourceforge.net. February 15, 2010 [September 18, 2012]. (原始內容存檔於2021-03-02). 
  6. ^ The Z-Shell (ZSH) Lovers' Page. Guckes.net. c. 2004 [October 2, 2012]. (原始內容存檔於2017-05-17). 
  7. ^ Zsh Mailing List Archive. Zsh.org. August 8, 2005 [October 2, 2012]. (原始內容存檔於2021-03-02). 
  8. ^ Oh My ZSH - Community driven framework with 150+ plugins and 100+ themes. [May 7, 2014]. (原始內容存檔於2022-03-20). 
  9. ^ robbyrussell/oh-my-zsh. [2018-10-17]. (原始內容存檔於2021-03-02). A delightful community-driven (with 1,000+ contributors) framework for managing your zsh configuration. Includes 200+ optional plugins (rails, git, OSX, hub, capistrano, brew, ant, php, python, etc), over 140 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community. 

外部連結 編輯

官方 編輯

文章 編輯

其他 編輯