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. 

外部链接 编辑

官方 编辑

文章 编辑

其他 编辑