ZSHCONTRIB(1) General Commands Manual ZSHCONTRIB(1) (NAME) zshcontrib - zsh (DESCRIPTION) Zsh . zsh . . . (UTILITIES) (Accessing On-Line Help) ESC h ZLE run-help (bind) ( zshzle(1) ). run-help . run-help (alias) man . run-help . helpfiles Util Perl zsh . (autoloadable) run-help Functions/Misc . /usr/share/zsh /usr/local/share/zsh . helpfiles . ~/zsh_help . zsh : mkdir ~/zsh_help perl ~/zsh-5.9.2/Util/helpfiles ~/zsh_help HELPDIR run-help . . (startup) : HELPDIR=~/zsh_help run-help .zshrc : unalias run-help autoload run-help `autoload run-help` run-help fpath ( zshparam(1) ). zsh Functions/Misc/run-help . (Recompiling Functions) zsh zsh (function digests) zcompile . zsh . fpath zsh . zrecompile Functions/Misc . zrecompile [ -qt ] [ name ... ] zrecompile [ -qt ] -p arg ... [ -- arg ... ] *.zwc . .zwc . name *.zwc . *.zwc fpath . -t () () . -q zrecompile . -t . -p arg zcompile `--` . : zrecompile -p \ -R ~/.zshrc -- \ -M ~/.zcompdump -- \ ~/zsh/comp.zwc ~/zsh/Completion/*/_* ~/.zshrc.zwc ~/.zshrc ~/.zshrc ~/.zshrc.zwc . (mapping) . ~/.zcompdump ~/.zcompdump.zwc . ~/zsh/comp.zwc . -p zrecompile . fpath : for ((i=1; i <= $#fpath; ++i)); do dir=$fpath[i] zwc=${dir:t}.zwc if [[ $dir == (.|..) || $dir == (.|..)/* ]]; then continue fi files=($dir/*(N-.)) if [[ -w $dir:h && -n $files ]]; then files=(${${(M)files%/*/*}#/}) if ( cd $dir:h && zrecompile -p -U -z $zwc $files ); then fpath[i]=$fpath[i].zwc fi fi done -U -z fpath zsh . fpath zrecompile . zsh . zkbd Functions/Misc . zkbd (autoloaded) : zsh -f ~/zsh-5.9.2/Functions/Misc/zkbd zkbd return . zkbd Delete ^H ^? . zkbd key .zkbd HOME ZDOTDIR . TERM VENDOR OSTYPE (hyphen) . <> <<.>> .zshrc key bindkey : source ${ZDOTDIR:-$HOME}/.zkbd/$TERM-$VENDOR-$OSTYPE [[ -n ${key[Left]} ]] && bindkey "${key[Left]}" backward-char [[ -n ${key[Right]} ]] && bindkey "${key[Right]}" forward-char # etc. <> zkdb fpath ( zshparam(1) ). zsh Functions/Misc/zkbd . (Dumping Shell State) zsh . zsh ( zsh(1) ) zsh . reporter Util . ( autoload reporter reporter fpath .) <> . reporter <<.>> : . ~/zsh-5.9.2/Util/reporter > zsh.report zsh.report . . reporter . . reporter aliases options zstyles . bindings reporter . reporter . functions reporter compdump ( zshcompsys(1) ). reporter [ state ... ] . state : all . aliases alias . bindings ZLE . completion compctl . functions zstyles . functions (autoloads) . limits limit . options setopt . styles zstyles. variables export . zstyles zstyle . state all . <> state a aliases z zstyles . add-zsh-hook [ -L | -dD ] [ -Uzk ] hook function SPECIAL FUNCTIONS zshmisc(1) . `hook functions' ( ) . add-zsh-hook . hook chpwd periodic precmd preexec zshaddhistory zshexit zsh_directory_name . zsh_directory_name . function . . . -L typeset . -d function . -D function . -U -z -k function autoload . zsh -Uz . add-zle-hook-widget [ -L | -dD ] [ -Uzk ] hook widgetname Special Widgets zshzle(1) . add-zle-hook-widget . hook isearch-exit isearch-update line-pre-redraw line-init line-finish history-line-set keymap-select zle-isearch-exit . hook . widgetname ZLE . . zle widgetname -Nw -f "nolast" -- "$@" `WIDGET' widgetname . -d widgetname . -D widgetname . widgetname widgetname . -U -z -k add-zsh-hook autoload . `zle -N widgetname' . widgetname zstyle hook `widgets'. -L `zstyle -L' . add-zle-hook-widget . cdr . pushd popd dirs ( ) . . pushd cdr . (Installation) (hook function) . autoload add-zsh-hook : autoload -Uz chpwd_recent_dirs cdr add-zsh-hook add-zsh-hook chpwd chpwd_recent_dirs . (Use) cdr . cdr N N . 1 . 1 recent-dirs-file . recent-dirs-default cdr cd . . 1 . pushd . (completion) cdr compinit : zstyle ':completion:*:*:cdr:*:*' menu selection . verbose . (Options) cdr . -l ( ~) . ( ). . -r reply . . -e . (sanity check) . . ( ) / . . -p 'pattern' glob () . (wildcard) ( '*removeme*') . . -P -p . (styles) (completion) zstyle zshmodules(1) . (context) ':chpwd:*' : zstyle ':chpwd:*' recent-dirs-max 0 recent-dirs-max 0 . '*' . recent-dirs-insert ( ':completion:*') '*' . recent-dirs-default true "cd" (fall through) . . recent-dirs-insert . recent-dirs-file . ${ZDOTDIR:-$HOME}/.chpwd-recent-dirs (home) ZDOTDIR . $'...' . . . . . + . : zstyle ':chpwd:*' recent-dirs-file \ ~/.chpwd-recent-dirs-${TTY##*/} + . . zstyle -e : zstyle -e ':chpwd:*' recent-dirs-file pick-recent-dirs-file pick-recent-dirs-file() { if [[ $PWD = ~/text/writing(|/*) ]]; then reply=(~/.chpwd-recent-dirs-writing) else reply=(+) fi } ~/text/writing . recent-dirs-insert . recent-dirs-default true true (history) . . always cd . fallback . both (tag) recent-dirs . . recent-dirs-max . . 20 . . recent-dirs-prune ( ) . : parent () ( ) . . ~pws ~pws/some/other/dir ~pws . () . ~pws/yet/another ~pws/some/other/dir ~pws . pattern:pattern zsh ( ) . . 'pattern:/tmp(|/*)' /tmp . EXTENDED_GLOB . recent-dirs-pushd true cdr cd pushd . . zsh_directory_name_cdr (hook) : autoload -Uz add-zsh-hook add-zsh-hook -Uz zsh_directory_name zsh_directory_name_cdr ~[1] $PWD . ~[... . . . : ( ) . . -- ( (subshells) evals traps )-- . cd -q pushd -q . chpwd_recent_dirs . (ABBREVIATED DYNAMIC REFERENCES TO DIRECTORIES) Dynamic named directories Filename Expansion zshexpn(1) . ~[...] . zsh_directory_name_generic . : . <<:>> . ~[g:p:s] : g git . . p git . s (source) . . : . . (wrapper function) . (autoload) . zdn_mywrapper . . . zsh_directory_name : autoload -Uz add-zsh-hook zsh_directory_name_generic zdn_mywrapper add-zsh-hook -U zsh_directory_name zdn_mywrapper (wrapper function) zdn_top . (style) mapping . (context) :zdn:wrapper-name wrapper-name zsh_directory_name_generic : zstyle :zdn:zdn_mywrapper: mapping zdn_mywrapper_top . . . ( . (escaping) .) :default: /:var ( ) . zdn_top zdn_top . local -A zdn_top=( g ~/git ga ~/alternate/git gs /scratch/$USER/git/:second2 :default: /:second1 ) ~[g:...] ~[ga:...] ~[gs:...] . ~[g] ~/git . gs /scratch/$USER/git second2 g ga second1 . g ga gs 1 (hook) . ( ). . second1 : local -A second1=( p myproject s somproject os otherproject/subproject/:third ) zdn_top ~[g:p] ~/git/myproject . ( ). os :default: ~[g:p:x] ~[ga:s:y] x y . (generic) _zdn_ . reply (local) . (automounted) . . (autoloadable) . ~[gs:p:s] /scratch/$USER/git/myscratchproject/top/srcdir ( $USER ). local -A zdn_top=( g ~/git ga ~/alternate/git gs /scratch/$USER/git/:second2 :default: /:second1 ) local -A second1=( p myproject s somproject os otherproject/subproject/:third ) local -A second2=( p myscratchproject s somescratchproject ) local -A third=( s top/srcdir d top/documentation ) # autoload not needed if you did this at initialisation... autoload -Uz zsh_directory_name_generic zsh_directory_name_generic "$@ (style) (wrapper) . : typeset -A zdn_mywrapper_top=(...) # ... and so on for other associative arrays ... zstyle ':zdn:zdn_mywrapper:' mapping zdn_mywrapper_top autoload -Uz add-zsh-hook zsh_directory_name_generic zdn_mywrapper add-zsh-hook -U zsh_directory_name zdn_mywrapper zdn_mywrapper : zsh_directory_name_generic "$@" (GATHERING INFORMATION FROM VERSION CONTROL SYSTEMS) (VCS) subversion CVS git ( prompt ) (branch) . vcs_info . (VCS) : Bazaar (bzr) https://bazaar.canonical.com Codeville (cdv) http://freecode.com/projects/codeville Concurrent Versioning System (cvs) https://www.nongnu.org/cvs Darcs (darcs) http://darcs.net Fossil (fossil) https://fossil-scm.org Git (git) https://git-scm.com GNU arch (tla) https://www.gnu.org/software/gnu-arch Mercurial (hg) https://www.mercurial-scm.org Monotone (mtn) https://monotone.ca Perforce (p4) https://www.perforce.com Subversion (svn) https://subversion.apache.org SVK (svk) https://svk.bestpractical.com quilt (https://savannah.nongnu.org/projects/quilt) . Quilt Support . vcs_info: autoload -Uz vcs_info (prompt) $psvar . ( ) ( vcs_info - ): zstyle ':vcs_info:*' actionformats \ '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' zstyle ':vcs_info:*' formats \ '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f ' zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' precmd () { vcs_info } PS1='%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_}%f%# ' . vcs_info precmd . '${vcs_info_msg_0_}' (single quoted) (prompt) . '${vcs_info_msg_0_}' PROMPT_SUBST . vcs_info_printsys : % vcs_info_printsys ## list of supported version control backends: ## disabled systems are prefixed by a hash sign (#) bzr cdv cvs darcs fossil git hg mtn p4 svk svn tla ## flavours (cannot be used in the enable or disable styles; they ## are enabled and disabled with their master [git-svn -> git]) ## they *can* be used in contexts: ':vcs_info:git-svn:*'. git-p4 git-svn hg-git hg-hgsubversion hg-hgsvn . : zstyle ':vcs_info:*' disable bzr cdv darcs mtn svk tla : zstyle ':vcs_info:*' enable git cvs svn vcs_info_printsys disable ( enable - ) (#) . . (Configuration) vcs_info zstyle . (context) : :vcs_info:vcs-string:user-context:repo-root-name vcs-string : git git-svn git-p4 hg hg-git hg-hgsubversion hg-hgsvn darcs bzr cdv mtn svn cvs svk tla p4 fossil. Quilt <<.quilt-quilt-mode>> ( Quilt Support ) (hooks) <<+hook-name>> ( Hooks in vcs_info ). quilt <<.quilt-quilt-mode>> . . user-context vcs_info ( ). repo-root-name (style) . /usr/src/zsh CVS repo-root-name zsh . vcs-string : -init- (VCS) . -preinit- vcs_info . formats vcs_info_lastmsg . repo-root-name -all- . formats actionformats branchformat repo-root-name . '*' . user-context : default command vcs_info_lastmsg ':vcs_info:*' VCS (user-contexts) . . formats actionformats ( ) . actionformats (interactive rebase) (merge conflict). branchformat %b formats actionformats (revision number) . . nvcsformats <<>> vcs_info . vcs_info (prompt) . PS1='${vcs_info_msg_0_}' . hgrevformat hg (changeset) . ( branchformat ) . get-revision true . ( use-simple) hg . max-exports vcs_info_msg_*_ vcs_info ..TP enable . -init- . NONE vcs_info . ALL vcs_info . disable ALL enable . ALL NONE . disable vcs_info ( -init- ). enable ALL . disable-patterns $PWD . vcs_info . :vcs_info:-init-:*:-all- . ~/.zsh vcs_info : zstyle ':vcs_info:*' disable-patterns "${(b)HOME}/.zsh(|/*)" use-quilt quilt <> . Quilt Support . quilt-standalone <> . Quilt Support . quilt-patch-dir $QUILT_PATCHES. Quilt Support . quiltcommand quilt quilt . check-for-changes %c %u (uncommitted) . stagedstr unstagedstr . git hg bzr ( unstaged ). hg get-revision use-simple . . bzr (lightweight checkouts) use-server . ( ). . check-for-staged-changes check-for-changes (worktree) .${vcs} . %c ( stagedstr) %u . check-for-changes . git (index) . . . stagedstr (staged) %c . unstagedstr (unstaged) %u . command vcs_info . ':vcs_info:*' . ( ) ( svn svn ). repo-root-name -all- . . git /usr/bin /usr/local/bin . $PATH : zstyle ':vcs_info:git:*:-all-' command /usr/local/bin/git use-server (p4) Perforce Perforce . . ( host:port ) vcs_info_p4_dead_servers . p4 P4CONFIG Perforce . VCS_INFO_detect_p4 . (bzr) checkout check-for-changes . use-simple true . bzr hg git . hg hexdump dirstate . get-revision true vcs_info ( git hg ). git checkout %i . hg %i . get-mq true hg Mercurial Queue (mq) . <<%m>> . get-bookmarks true hg (bookmarks) . <<%m>> . checkout . . use-prompt-escapes vcs_info (prompt escapes) . ( vcs_info_lastmsg .) debug . (hooks) vcs_info . hooks . Hooks in vcs_info . patch-format nopatch-format %m formats actionformats git hg . % . backend_misc ${backend_misc[patches]} ( set-patch-format )..TP get-unapplied (boolean) backend ( Mercurial Queue) . backend quilt hg git . : formats " (%s)-[%b]%u%c-" actionformats " (%s)-[%b|%a]%u%c-" branchformat "%b:%r" ( bzr svn svk hg) nvcsformats "" hgrevformat "%r:%h" max-exports 2 enable ALL disable ( ) disable-patterns ( ) check-for-changes false check-for-staged-changes false stagedstr (: "S") unstagedstr (: "U") command ( ) use-server false use-simple false get-revision false get-mq true get-bookmarks false use-prompt-escapes true debug false hooks ( ) use-quilt false quilt-standalone false quilt-patch-dir - $QUILT_PATCHES quiltcommand quilt patch-format backend nopatch-format backend get-unapplied false formats actionformats : %s (VCS) (git hg svn ). %b . %a (action) . actionformats . %i (revision) . hg hgrevformat . %c stagedstr (staged) . %u unstagedstr (unstaged) . %R . %r . %R /foo/bar/repoXY %r repoXY . %S . $PWD /foo/bar/repoXY/beer/tasty %S beer/tasty . %m <<>> (misc). backend . backend hg git (expando) . hg mq git rebase cherry-pick stgit . patch-format nopatch-format . . backend hg (bookmark) ( mq). get-mq get-bookmarks . . - ( ). backend `standalone' quilt %Q . %Q Quilt. quilt ( `addon' backend `standalone') patch-format quilt . set-patch-format nopatch-format . Quilt Support . branchformat : %b . hg (topic) ..TP %r hgrevformat hg. hgrevformat : %r . %h . patch-format nopatch-format : %p applied-string . %u unapplied-string . %n . %c . %a (%a = %n + %c). %g (guards) mq ( hg). %G (guards) mq ( hg). (VCS) . nvcsformats . (Oddities) %b ( /bold) formats %b %%b . vcs_info %%b %b zsh . %b branchformat %%%%b . . . gen-applied-string gen-unapplied-string set-patch-format % (`foo=${foo//'%'/%%}') () vcs_info . () . Quilt (Quilt Support) Quilt . . ( - ). Quilt . vcs_info quilt : <> <>. Quilt use-quilt %Q formats actionformats : zstyle ':vcs_info:*' use-quilt true Quilt `.quilt-quilt-mode' vcs-string quilt-mode addon standalone. : :vcs_info:git.quilt-addon:default:repo-root-name. <> vcs_info . quilt . `QUILT_PATCHES' . `patches' . $QUILT_PATCHES `quilt-patch-dir' . (: post-quilt vcs_info $QUILT_PATCHES ). quilt . vcs_info `.pc' Quilt . quilt ( ). vcs_info . get-unapplied . vcs_info ( Configuration Hooks in vcs_info ) . ( stgit git mq hg) quilt . quilt <> ( %Q) formats actionformats ). <> vcs_info quilt . ( `svn' `cvs' ) `-quilt-' . . vcs_info <<>> quilt `misc' ( %Q <>) . <> . . . vcs_info Quilt <> vcs_info : <> `quilt-standalone' . . : `always' vcs_info `never' . quilt-standalone . (scalar) `always'/`never' . quilt-standalone . quilt-standalone (associative array) `true' . quilt-standalone . `0' (true) (false) . quilt-standalone . vcs_info [user-context] backend ${vcs_info_msg_*_} . (prompt) precmd ( ). default user-context (style context) . vcs_info_hookadd (hook) . . `+vi-' . vcs_info . vcs_info_hookdel . . `-a' . ( ). `+vi-' . vcs_info . vcs_info_lastmsg ${vcs_info_msg_*_} . use-prompt-escapes ':vcs_info:formats:command:-all-' . max-exports . vcs_info_printsys [user-context] . ( ) disable . vcs_info_setsys backend vcs_info . VCS . VCS_INFO_* . ${vcs_info_msg_N_} ( ) N vcs_info_msg_0_. vcs_info . formats actionformats nvcsformats . . ${vcs_info_msg_0_} ${vcs_info_msg_1_} N ${vcs_info_msg_N-1_} . ( max-exports .) VCS_INFO_* . vcs_info vcs_info . . : :vcs_info:vcs-string+hook-name:user-context:repo-root-name hooks . : zstyle ':vcs_info:*+foo:*' hooks bar baz `foo' backend . `+vi-' `foo' `+vi-bar' `+vi-baz'. vcs_info_hookadd . vcs_info_hookdel . `debug' . . ( vcs_info_hookadd ) . user_data . : +vi-git-myfirsthook(){ user_data[myval]=$myval } +vi-git-mysecondhook(){ # do something with ${user_data[myval]} } : ret . `' . ret . . hook_com . . context . (local) . vcs VCS . enable/disable . start-up . : start-up vcs_info VCS . vcs_info . ret 1 vcs_info 2 vcs_info . pre-get-data start-up VCS. gen-hg-bookmark-string backend Mercurial (bookmark) get-revision get-bookmarks true . Mercurial vcs_info `hg' . ${hook_com[hg-active-bookmark]} . (unset) . ret ${hook_com[hg-bookmark-string]} (escape) %m formats actionformats backend_misc ${backend_misc[bookmarks]} . gen-applied-string backend git ( stgit rebase merge) hg ( mq) quilt applied-string zstyle use-quilt quilt true (backend mq stgit ). . `patch-name first line of the log message' patch-name (whitespace) . mq `patch name' . ret ${hook_com[applied-string]} %p patch-format nopatch-format . set-patch-format (escape ) % (prompt) . ( Oddities .) quilt ${hook_com[quilt-patches-dir]} ${hook_com[quilt-pc-dir]} . gen-unapplied-string git ( stgit rebase) hg ( mq) quilt unapplied-string get-unapplied true . vcs_info . gen-applied-string . ret ${hook_com[unapplied-string]} %u patch-format nopatch-format . set-patch-format % (prompt) . ( Oddities .) quilt ${hook_com[quilt-patches-dir]} ${hook_com[quilt-pc-dir]} . gen-mqguards-string hg guards-string get-mq true (). (guards) mq . ret ${hook_com[guards-string]} %g patch-format nopatch-format . no-vcs . `hook_com' . post-backend . `hook_com' set-message . post-quilt quilt . : . quilt ( `addon' `standalone') . (patch series) . quilt ( `.pc') "-nopc-" . `hook_com' . set-branch-format `branchformat' . . `hook_com' `branch' `revision' . vcs_info . ret ${hook_com[branch-replace]} `%b' vcs_info . set-hgrev-format `hgrevformat' . . `hook_com' `hash' `localrev' . vcs_info . ret ${hook_com[rev-replace]} `%i' vcs_info . pre-addon-quilt quilt vcs_info "addon" ( quilt ) . quilt . `ret' quilt . set-patch-format patch-format nopatch-format quilt mqueue . git hg quilt . %p (${hook_com[applied]}) %u (${hook_com[unapplied]}) . mercurial %g (${hook_com[guards]}) . ret ${hook_com[patch-replace]} patch-format nopatch-format . gen-applied-string gen-unapplied-string ( ) % patch-format (prompt) . ( Oddities .) quilt ${hook_com[quilt-patches-dir]} ${hook_com[quilt-pc-dir]} . set-message `vcs_info_msg_N_' . `N' formats actionformats . `hook_com' : `action' `branch' `base' `base-name' `subdir' `staged' `unstaged' `revision' `misc' `vcs' `miscN' (N ). vcs_info . ( formats actionformats ) `hook_com' ( miscN) `_orig' . `_orig' . ret ${hook_com[message]} vcs_info . Examples Misc/vcs_info-examples Zsh . ..PP (Examples) vcs_info ( (prompt) ): zstyle ':vcs_info:*' enable NONE bzr svk: zstyle ':vcs_info:*' disable bzr svk bzr svk: zstyle ':vcs_info:*' enable bzr svk git: zstyle ':vcs_info:git:*' formats ' GIT, BABY! [%b]' zstyle ':vcs_info:git:*' actionformats ' GIT ACTION! [%b|%a]' %x (formats actionformats branchformat ) `zformat' `zsh/zutil' . zformat %x . branchformat mercurial : %12.12i. . `%min.maxx' . . `The zsh/zutil Module' zshmodules(1) . bzr zstyle ':vcs_info:bzr:*' use-simple true use-simple (`the-right-thing[tm]') . (revision) bzr svn: zstyle ':vcs_info:(svn|bzr):*' \ branchformat '%b%%F{yellow}:%r' Oddities . : zstyle ':vcs_info:(svn|bzr):*' \ branchformat '%b%{'${fg[yellow]}'%}:%r' (interpolate) % (escape) . ${fg[yellow]} % . vcs_info %{...%} . VCS ( ) : vcsi() { vcs_info interactive; vcs_info_lastmsg } vcs_info_lastmsg ':vcs_info:*:interactive:*' . (hooks) : `svn' `subversion' %s formats vcs_info . vcs_info : zstyle ':vcs_info:*+set-message:*' hooks svn2subversion . . (style) `debug' : zstyle ':vcs_info:*+*:*' debug true . `+vi-svn2subversion' . `+vi-' . . : zstyle ':vcs_info:*+*:*' debug false : function +vi-svn2subversion() { [[ ${hook_com[vcs_orig]} == svn ]] && hook_com[vcs]=subversion } . (context) . `svn' : zstyle ':vcs_info:svn+set-message:*' hooks svn2subversion function +vi-svn2subversion() { hook_com[vcs]=subversion } (bookmark) hg . : zstyle ':vcs_info:hg+gen-hg-bookmark-string:*' hooks hgbookmarks `+vi-hgbookmarks' : function +vi-hgbookmarks() { # # . . # # ** . # : "sh/*" # ( sh ). # # . # . # `hg' # . local s="${(Mj:,:)@:#sh/*}" # # hook_com[] # . `gen-hg-bookmark-string' # `hg-bookmark-string' . : hook_com[hg-bookmark-string]=$s # # `ret' # : ret=1 return 0 } Misc/vcs_info-examples Zsh . vcs_info zsh . (PROMPT THEMES) (Installation) Functions/Prompts `promptinit' `prompt_' . `colors' `add-zsh-hook' Functions/Misc . . fpath ( ) promptinit (autoload) . promptinit . .zshrc ~/myfns : fpath=(~/myfns $fpath) autoload -U promptinit promptinit (Theme Selection) prompt . promptinit .zshrc zsh . prompt [ -c | -l ] prompt [ -p | -h ] [ theme ... ] prompt [ -s ] theme [ arg ... ] . theme . -l . `random' . theme . . : -c . -l . -p theme theme . -h theme prompt theme . -s theme . prompt_theme_setup theme prompt . . . prompt off `off' . prompt default `default' zsh . prompt restore `restore' `prompt' (cleanup) ( ). `prompt off' `prompt default' `prompt restore' . (Writing Themes) `prompt_name_setup' fpath ~/myfns . . PROMPT RPROMPT PS1 PS2 RPS1 . (autoload) . (setup) : prompt_opts prompt_opts "bang" "cr" "percent" "sp" / "subst" . setopt (promptbang ) . prompt_opts setopt localoptions . (Modify hooks) add-zsh-hook add-zle-hook-widget ( Manipulating Hook Functions ). prompt_theme_hook . (Declare cleanup) : prompt_cleanup command command (quote) . command eval . . (Define preview) prompt_name_preview . promptinit . `prompt -p' . (Provide help) prompt_name_help . `prompt -h' . (Widgets) ZLE ( zshzle(1)) . .zshrc : autoload function zle -N function bindkey . . bash (bash-style word functions) bash . : autoload -U select-word-style select-word-style bash forward-word-match, backward-word-match kill-word-match, backward-kill-word-match transpose-words-match, capitalize-word-match up-case-word-match, down-case-word-match delete-whole-word-match, select-word-match select-word-style, match-word-context, match-words-by-style `-match' . . (styles) select-word-style . select-word-match (text object) vi . zshzle(1) Text Objects vim . select-word-style . -match . . . bash . normal : $WORDCHARS . shell (token) . whitespace (whitespace) . default `normal' . `default' (upper case) (subword matching) . : . subword-range `[:upper:]' `[...]' ( ). zstyle zshmodules(1) . (context) :zle:widget widget select-word-style :zle:forward-word . select-word-style `:zle:*' () . word-style . . normal $WORDCHARS word-chars word-class . specified normal . unspecified specified. . shell . `()' . whitespace . $WORDCHARS word-chars $WORDCHARS . word-class (character class) word-chars . word-class `-:[:alnum:]' word-class `-' `:'. `]' `^' `-' . word-style `-subword' . skip-chars transpose-words . . zstyle ':zle:transpose-words' skip-chars 1 transpose-words-match X fooXbar ( X ) barXfoo . word-context . pattern () subcontext () . pattern (colon) subcontext . . : between back . ..PP skip-whitespace-first forward-word . true forward-word : zsh . select-word-style bash :zle:* true false . :zle:forward-word* (override) . . backward-kill-space-word backward-kill-word-match ( backward-kill-word) (space-delimited) . zle -N backward-kill-space-word backward-kill-word-match zstyle :zle:backward-kill-space-word word-style space backward-kill-space-word (bind) . select-word-style : zstyle ':zle:*' word-style standard zstyle ':zle:*' word-chars '' bash WORDCHARS . style ':zle:*kill*' word-style space <> . word-chars word-class . word-context . zstyle ':zle:*' word-context \ "*/*" filename "[[:space:]]" whitespace zstyle ':zle:transpose-words:whitespace' word-style shell zstyle ':zle:transpose-words:filename' word-style normal zstyle ':zle:transpose-words:filename' word-chars '' ( / ) transpose-words . . . :zle:transpose-words . zstyle match-words-by-style . . curcontext :zle:widget matched_words match-words-by-style . matched_words : () () () () skip-chars () () () . . matched_words match-words-by-style (local -A matched_words) start word-before-cursor ws-before-cursor ws-after-cursor word-after-cursor ws-after-word end . ( ws-after-cursor ) is-word-start . . match-words-by-style . : -w word-style -s skip-chars -c word-class -C word-chars -r subword-range match-words-by-style -w shell -c 0 . word-context match-word-context . . bracketed-paste-magic bracketed-paste ( <> zshzle(1) ) . self-insert . url-quote-magic . bracketed-paste-magic bracketed-paste (wrapper) self-insert zstyle . : autoload -Uz bracketed-paste-magic zle -N bracketed-paste bracketed-paste-magic bracketed-paste-magic bracketed-paste . zstyle . <<:bracketed-paste-magic>> . active-widgets . self-insert-unmeta . <> self-insert . ( ) . <> . inactive-keys active-widgets self-insert-unmeta . () . paste-init ( ) . . <> . ZLE <> paste-init BUFFER PASTED active-widgets . paste-init . bracketed-paste-magic backward-extend-paste paste-init . zstyle :bracketed-paste-magic paste-init \ backward-extend-paste backward-extend-paste LBUFFER PASTED active-widgets . url-quote-magic . paste-finish . active-widgets `BUFFER' . ZLE . paste-finish . bracketed-paste-magic quote-paste paste-finish . zstyle :bracketed-paste-magic paste-finish \ quote-paste zstyle :bracketed-paste-magic:finish quote-style \ qqq BUFFER quote-style . bracketed-paste : zstyle :bracketed-paste-magic:finish quote-style \ none : active-widgets ( paste-init paste-finish) BUFFER . BUFFER paste-finish PASTED . copy-earlier-word insert-last-word copy-prev-shell-word . . N N N . insert-last-word . . widget . insert-last-word . cycle-completion-positions . . . . delete-whole-word-match -match . . . . kill (yank) cutbuffer . kill-whole-word-match : zle -N kill-whole-word-match delete-whole-word-match kill-whole-word-match. up-line-or-beginning-search, down-line-or-beginning-search up-line-or-search down-line-or-search : . history-beginning-search-backward -forward . edit-command-line ksh. bindkey -M vicmd v edit-command-line editor . : zstyle :zle:edit-command-line editor gvim -f expand-absolute-path . . history-search-end history-beginning-search-backward-end history-beginning-search-forward-end . ( `History Control' zshzle(1) ) . . autoload . zle -N history-beginning-search-backward-end \ history-search-end zle -N history-beginning-search-forward-end \ history-search-end bindkey '\e^P' history-beginning-search-backward-end bindkey '\e^N' history-beginning-search-forward-end history-beginning-search-menu . history-beginning-search-backward . . ( ). . . `-end' . `-space' (wildcard) ( ). : zle -N history-beginning-search-menu-space-end \ history-beginning-search-menu history-pattern-search history-pattern-search . zsh ^ $ . . : autoload -U history-pattern-search zle -N history-pattern-search-backward history-pattern-search zle -N history-pattern-search-forward history-pattern-search incarg . ( ). incarg . bindkey '^X+' incarg incremental-complete-word . ^H DEL . return ( ). TAB ^G ^D . . bindkey '^Xi' incremental-complete-word insert-composed-char . ASCII ( ). (mnemonic) . - RFC 1345 ( : http://www.faqs.org/rfcs/rfc1345.html). . insert-composed-char a: a . . zsh ( --enable-multibyte) ISO-8859-1 . . ( C .) . zle ( ) . . Unicode () insert-unicode-char . Unicode U+0180 . . define-composed-chars . zsh-workers@zsh.org . . . ! (Grave). ' (Acute). > (Circumflex). ? (Tilde). ( ~ RFC 1345 .) - (Macron). ( ). ( (Breve). ( ). . i L l . : (Diaeresis/Umlaut). c (Cedilla). _ . / . " ( ). ; (Ogonek). ( ). < (Caron). ( v ). 0 . 2 . 9 (Horn) . RFC 1345 . RFC 1345 ASCII ! ~ (0x21 0x7e) ^ ^A A ..PP . ASCII : <( ( ) // ( ) )> ( ) (! ( ) !! ( ) !) ( ) '? () : ss ( scharfes S) D-, d- (Eth) TH, th (Thorn) kk (Kra) 'n 'n NG, ng Ng OI, oi Oi yr yr ED (ezh) Ct Pd ( ) Cu Ye Eu (: RFC 1345 ) <<>> ( ) . ( <<>> .) !I BB SE (Section) Co ( ) -a << -- (Soft hyphen) Rg PI ( ) -o >> ?I -1 (Hyphen) -N (En dash) -M (Em dash) -3 (Horizontal bar) :3 .3 !2 =2 '6 '9 .9 <<>> 9' <<>> "6 "9 :9 <<>> 9" <<>> /- (Dagger) /= (Double dagger) .PD 0 DG -2, +-, -+ - +/- -/+ 2S 3S 1S My .M 14 12 () 34 *X -: %0 ( ) FA, TE, /0 ( ) ( ) dP, DE, NB () () (-, -) *P, +Z *-, Ob, Sb (bullet) RT, 0(, 00 cS, cH, cD, cC : Md, M8, M2, Mb, Mx, MX : () () () () Fm, Ml () '> / ( ^) '! ( `) ', (Cedilla) ': () 'm ( ) '' (Acute) insert-files . (Return) . bindkey '^Xf' insert-files insert-unicode-char () . insert-unicode-char . . ^XU `^XU 4 c ^XU' L ( U+004c) . ( ) insert-composed-char . narrow-to-region [ -p pre ] [ -P post ] [ -S statepm | -R statepm | [ -l lbufvar ] [ -r rbufvar ] ] [ -n ] [ start end ] narrow-to-region-invisible (mark) . . narrow-to-region . recursive-edit . . -p pretext -P posttext . -n pretext posttext . . -S statepm statepm -R statepm . . recursive-edit -S `zle recursive-edit' -R . statepm _ntr_ narrow-to-region . (local) . -l lbufvar -r rbufvar . lbufvar LBUFFER rbufvar RBUFFER . -S -R . narrow-to-region-invisible narrow-to-region `...' . ..PP zle ( ). . . . local state narrow-to-region -p $'Editing restricted region\n' \ -P '' -S state zle recursive-edit narrow-to-region -R state predict-on . predict-on . predict-off . predict-off . toggle . ( ) TAB <<>> ( ). return . predict-on : delete-backward-and-predict backward-delete-char . (bind) . insert-and-predict self-insert . . predict-off . predict-on autoload predict-off . zle -N predict-on zle -N predict-off bindkey '^X^Z' predict-on bindkey '^Z' predict-off read-from-minibuffer . zle ( execute-named-cmd ) . $REPLY . ( ^G) $REPLY . (prompt) <> . $LBUFFER $RBUFFER . . $REPLY . : <<-k num>> num . $REPLY . read num . minibuffer . executed-named-cmd . replace-argument replace-argument-edit replace-argument ( ). . . 0 . . . . edit : zle -N replace-argument-edit replace-argument . replace-string replace-pattern replace-string-again replace-pattern-again replace-string . () . <> <> zsh . (extended globbing) zsh (glob qualifiers) . . <<&>> <<\N>> N . <<\{N}>> . <> ( <>) RE_MATCH_PCRE ( regexp-replace ). . . edit-previous :zle:widget ( :zle:replace-string) true . . replace-string-again . replace-string <> <> (literal) . . replace-string . : print This line contains fan and fond replace-pattern `f(?)n' `c\1r' : print This line contains car and cord narrow-to-region-invisible . undo . send-invisible read-from-minibuffer . (`*') . $INVISIBLE . ( ^G) push-line $INVISIBLE . `Non-echoed text: ' ( emacs). $INVISIBLE . ${ INVISIBLE } . smart-insert-last-word insert-last-word : zle -N insert-last-word smart-insert-last-word insert-last-word INTERACTIVE_COMMENTS . <<>> . <<>> . match . :insert-last-word . : zle -N insert-last-assignment smart-insert-last-word zstyle :insert-last-assignment match '[[:alpha:]][][[:alnum:]]#=*' bindkey '\e=' insert-last-assignment auto-previous . auto-previous ( ) . transpose-lines . Emacs . . ( ) . . . -1 . url-quote-magic self-insert URL . URI . . : url-metas `:url-quote-magic:scheme' ( scheme URL "ftp"). URL . zsh '<' '>' ( ). url-seps . url-seps url-metas . '<' '>' $histchars. url-globbers `:url-quote-magic' . URL . `noglob' . URL (url-local-schema ) url-seps url-metas . `noglob' `urlglobber' `globurl' ( zsh/parameter ). url-local-schema `:urlglobber' url-quote-magic urlglobber . URI . "ftp" "file" . url-other-schema url-local-schema URI urlglobber url-quote-magic . URI url-local-schema . "http" "https" "ftp" . url-local-schema url-globbers . url-quote-magic `urlglobber' `globurl' `noglob urlglobber' . URL URL URL . vi-pipe . . vi-pipe . vi . which-command which-command . . whence :zle:$WIDGET . whence -c . zcalc-auto-insert zcalc <> . `+' `-' `*' `/' . zcalc "ans " . . ZCALC_AUTO_INSERT_PREFIX . `+12' return . zcalc RPN ( -r) . zcalc . (Utility Functions) . `autoload -U function' . split-shell-arguments . reply . . ( KSH_ARRAYS ) . (quotes) reply . REPLY reply . REPLY2 . reply REPLY REPLY2 (local) . modify-current-argument . modify-current-argument [ expr-using-$ARG | func ] ( ) . ARG . (quote) . ARG . REPLY . . : modify-current-argument '${(U)ARG}' ( ) (single quoting) : modify-current-argument '${(qq)${(Q)ARG}}' : expand-dir() { REPLY=${~1} REPLY=${REPLY:a} } modify-current-argument expand-dir expand-dir modify-current-argument . zstyle . . break-keys incremental-complete-word . . incremental-complete-word `:incremental' . completer incremental-complete-word insert-and-predict . . : zstyle ':completion:*' completer \ _complete _correct _approximate zstyle ':completion:incremental:*' completer \ _complete _correct zstyle ':completion:predict:*' completer \ _complete . _list _menu . _approximate _correct _expand _match . cursor insert-and-predict `:predict' . : complete . `key' . key n n . . . list incremental-complete-word ( ). `:completion:incremental' . insert-and-predict . always . `:predict' ( `:completion:predict'). match smart-insert-last-word ( EXTENDED_GLOB) . smart-insert-last-word ( ). smart-insert-last-word : zstyle :insert-last-word match '*[[:alpha:]/\\]*' : zstyle :insert-last-word match '*[[:alpha:][:space:]/\\]*' : zstyle :insert-last-word match '*([[:digit:]]?|[[:alpha:]/\\])*' "2>" . prompt incremental-complete-word . PS1 : %c ( ) . %l list `...' . list `false' `%l' . %n . %s `-no match-' `-no prefix-' . %u . `break-keys' `:incremental' . stop-keys incremental-complete-word . break-keys ( : `:incremental'). . toggle predict-on `:predict' . `true' . predict-off . verbose predict-on `:predict' . `true' . toggle . . widget command : zle . ( ). zstyle :copy-earlier-word widget smart-insert-last-word widget . (EXCEPTION HANDLING) zsh . throw exception throw exception . throw catch . . catch exception-pattern catch exception-pattern . exception-pattern EXTENDED_GLOB . catch . . CAUGHT catch . throw . always zshmisc(1) . . : { # "try" block # ... nested code here calls "throw MyExcept" } always { # "always" block if catch MyExcept; then print "Caught exception MyExcept" elif catch ''; then print "Caught a shell error. Propagating..." throw '' fi # Other exceptions are not handled but may be caught further # up the call stack. } : { # ... nested code here throws an exception } always { if catch *; then case $CAUGHT in (MyExcept) print "Caught my own exception" ;; (*) print "Caught some other exception" ;; esac fi } `try' . (subshell) (pipeline) . EXCEPTION . EXCEPTION . unset EXCEPTION . text.ps . zsh-mime-setup [ -fv ] [ -l [ suffix ... ] ] zsh-mime-handler [ -l ] command argument ... ~/.mime.types /etc/mime.types ~/.mailcap /etc/mailcap . (MIME) . zsh-mime-setup (autoload) . . zsh-mime-handler . `alias -s' . . ( pdf PDF ) . zsh-mime-setup -f . zsh-mime-handler . zsh-mime-setup -l . ( ) . zsh-mime-setup -v . mailcap needsterminal copiousoutput mailcap(4) mailcap(5) ( ). zstyle ( zshmodules(1) ). zsh-mime-setup . :mime: . * ( ) . . .pdf.gz . .pdf.gz .gz . .pdf.gz .gz ( ). .gz alias -s gz=zsh-mime-handler .gz . current-shell (true) mailcap eval sh . mailcap POSIX . disown (true) mailcap (disown) (job control) . (kill) . execute-as-is . . . *(*) *(/) AUTO_CD MIME . execute-never execute-as-is . MIME execute-as-is . . /mnt/windows zstyle ':mime:*' execute-never '/mnt/windows/*' MIME . . :P `Modifiers' zshexpn(1) . file-path find-file-in-path (true) . path . PATH_DIRS `/' . :mime:.suffix: handler . find-file-in-path file-path . ( ) handle-nonexistent . execute-as-is . :mime:.suffix: handler . flags handler mailcap . handle-nonexistent MIME . glob . [[:alpha:]]#:/* URL MIME . :mime:.suffix: handler . handler :mime:.suffix: mailcap . `.' . mailcap . flags needsterminal (pager) ( ) copiousoutput . mailcap ~/.mailcap /etc/mailcap . :mime: . + ..TP mailcap-priorities mailcap MIME . . . files ( mailcap). . ( .) priority mailcap. 0 9 5 . flags mailcap-prio-flags . place . :mime: . mailcap-prio-flags flags mailcap-priorities . mailcap ( mailcap) . . mime-types ~/.mime.types /etc/mime.types . :mime: . + . never-background mailcap ( ). pager $PAGER more copiousoutput . handler :mime:.suffix: suffix . : zstyle ':mime:*' mailcap ~/.mailcap /usr/local/etc/mailcap zstyle ':mime:.txt:' handler less %s zstyle ':mime:.txt:' flags needsterminal zsh-mime-setup mailcap . .txt `less file.txt' . needsterminal . .ext . `alias -s ext' `ps=zsh-mime-handler' . . : .mime.types mailcap .ext . ~/.mime.types mailcap . zsh-mime-handler . zsh-mime-setup -l . %s ( ) . . needsterminal copiousoutput (pager) . mailcap : text/html; /usr/bin/lynx '%s'; needsterminal `zsh-mime-handler -l command line' zsh . zsh-mime-setup . pick-web-browser MIME : autoload -U pick-web-browser alias -s html=pick-web-browser . . 255 . : browser-style . : running (GUI) X Window . x-browsers . . Firefox Opera Konqueror Mozilla URL . x X Window. x-browsers . . tty . tty-browsers . running x tty . x-browsers X Window System. . :mime: ( `*' ). zstyle ':mime:*' x-browsers opera konqueror firefox pick-web-browser Opera Konqueror Firefox Opera . firefox mozilla netscape opera konqueror . tty-browsers x-browsers X Window . elinks links lynx . command (style) . (context) :mime:browser:new:$browser: URL X :mime:browser:running:$browser: $browser x-browsers tty-browsers . %b %u URL . %b %u kfmclient openURL %u Konqueror firefox -new-tab %u Firefox opera -newpage %u Opera %b -remote "openUrl(%u)" . (MATHEMATICAL FUNCTIONS) zcalc [ -erf ] [ expression ... ] zsh. `Arithmetic Evaluation' zshmisc(1) . ( `.' ) . -f . ~/.zcalcrc (source) . emulate -L zsh setopt extendedglob . (source ) (fatal) . $ZDOTDIR $HOME . zsh/mathfunc `The zsh/mathfunc Module' zshmodules(1) . . . (prompt) . `4> ' $4 . ans . ~/.zcalc_history . `:q' ( `q' ). : ( `...' ) . zcalc . zcalc . . PI (3.14159...) E (2.71828...) . (global namespace) :local . _ . ans ( ) stack ( RPN) stack . compcontext match mbegin mend psvar. `-#base' `zcalc -#16' ( globbing `#' ). `-e' : . `-f' `3/4' 0 0.75 . . `-r' RPN ( ) . : (Stack) stack ${stack[1]} . (Operators and functions) (+ - * / ** ^ | &) zsh/mathfunc (pop) . () . ${stack[1]} (push) . (Expressions) . ( RPN). (Stack listing) -r . zcalc -r4 $stack[4] $stack[1] . : = = . pop pop (pop) . `>' . >ident > pop . zcalc . < push . ident ( > zcalc ) . : xy xy . `<>' . (prompt) ZCALCPROMPT . psvar ZCALCPROMPT `%1v' . `%1v> ' . ZCALC_ACTIVE RPN rpn 1 . (:) . . compinit (completion) . zcalc . :norm . %g printf . . :sci digits %g printf digits . . :fix digits %f printf digits ..TP :eng digits () %E printf digits. :raw : . . : :!line... line... . (context) . :! . :local arg ... . (global scope) . :function name [ body ] ( body) . :function :func :f . name . zmathfuncdef . zcalc (quoting) . : :f cube $1 * $1 * $1 ( ) . functions -M RPN (pop) cube. . [#base] (radix) base . `[#16]' `[##16]' . . `[#]' . `[#]' . $var var . var `$' . () . min(arg, ...) max(arg, ...) sum(arg, ...) zmathfunc zmathfunc min max sum . min max . sum . ( ). zsh/mathfunc `The zsh/mathfunc Module' zshmodules(1) . zmathfuncdef [ mathfunc [ body ] ] functions -M. mathfunc . body . $1 $2 ... ${1:-defvalue} ... . . zsh_math_func_mathfunc . . mathfunc . mathfunc . zmathfuncdef . zsh/newuser . . . zsh-newuser-install [ -f ] . ~/.zshrc . ZDOTDIR $ZDOTDIR/.zshrc .zshrc . .zshenv .zprofile .zshrc .zlogin . -f . .zshrc . (root) . . . . . `# Lines configured by zsh-newuser-install' `# End of lines configured by zsh-newuser-install' . .zshrc .zni . .zshrc . .zshrc . . (OTHER FUNCTIONS) Functions/Misc zsh . . (Descriptions) colors (associative array) ( ) ANSI . ( ) . colors . : black red green yellow blue magenta cyan white. . : bold faint standout underline blink reverse conceal. : none ( ) normal ( bold faint) no-standout no-underline no-blink no-reverse no-conceal. . : color colour . `fg-' `fg-red' . `bg-' `bg-blue' . bg- . <<>> . fg fg_bold fg_no_bold ANSI . fg . bg bg_bold bg_no_bold ANSI . bg . reset_color bold_color ANSI bold . fned [ -x num ] name zed -f. zsh zed fned fpath . histed [ [ name ] size ] zed -h. zsh zed histed fpath . is-at-least needed [ present ] zsh . present $ZSH_VERSION . . . zsh . is-at-least 3.1.6-15 && setopt NO_GLOBAL_RCS is-at-least 3.1.0 && setopt HIST_REDUCE_BLANKS is-at-least 2.6-17 || print "You can't use is-at-least here." nslookup [ arg ... ] (wrapper) nslookup zsh/zpty ( zshmodules(1) ). nslookup ( ) nslookup ( ). `:completion:nslookup' . pager prompt rprompt . regexp-replace var regexp replace . POSIX ( ERE) RE_MATCH_PCRE Perl ( pcre ). var . . MATCH MBEGIN MEND match mbegin mend (regular expression) . regexp . replace . : $MATCH . 0 1 . POSIX ERE ^ (word boundary) ( ) . run-help cmd ZLE run-help . <> . cmd ( ) . cmd HELPDIR . run-help-cmd . ( cmd ) . <> . <>: run-help-ssh() { emulate -LR zsh local -a args # Delete the "-l username" option zparseopts -D -E -a args l: # Delete other options, leaving: host command args=(${@:#-*}) if [[ ${#args} -lt 2 ]]; then man ssh else run-help $args[2] fi } Functions/Misc . run-help (autoload) (search path) . run-help-btrfs run-help-git run-help-ip run-help-openssl run-help-p4 run-help-sudo run-help-svk run-help-svn btrfs git ip openssl p4 sudo svk svn. tetris Zsh Emacs Tetris . . ZLE : autoload -U tetris zle -N tetris bindkey keys tetris keys . (keymap) Tetris . ( <>) . tetris . . tetriscurses zcurses . (timestep) (unicode block graphics) . : autoload -U tetriscurses tetriscurses zargs [ option ... -- ] [ input ... ] [ -- command [ arg ... ] ] GNU xargs . . zsh glob . option zargs xargs . input ( ) command xargs. arg ( ) command . arg input . (command) (arg) <> <<-r -->> . ls : autoload -U zargs zargs -- **/*(.) -- ls -ld -- <<-->> zargs ls <<->> (<>) . <<-->> : zargs -r -- ./*.back(#qN) -- rm -f <<-->> input () -e . . <<..>> : zargs -e.. -- **/*(.) .. ls -ld -- <<..>> . -i -I -l -L -n xargs . zargs -l -L input -n command arg . -i -I input <<-L 1>>. zargs xargs(1) ( zargs xargs ) zargs --help . zed [ -f [ -x num ] ] name zed [ -h [ name ] size ] zed -b ZLE . name . -f (autoloading) zed fpath . autoload . -x tab <<-x 2>> . -f name . -h (history) . -h . zed . . zed vi zed-vicmd . zed main vicmd . zed . zed return <<^X^W>> zed <> zed-vicmd . <> . . zed zed-vicmd . <<:completion:zed:>> . zle zed-set-file-name . zed <<\ex zed-set-file-name>> <> zed zed-vicmd . . zed . <> . <<:completion:zed-set-file-name:>> . <> HISTFILE . zed-set-file-name zed zed-normal-keymap zed . ( return .) . . zcp [ -finqQvwW ] srcpat dest zln [ -finqQsvwW ] srcpat dest zmv -C zmv -L . zsh zmv zcp zln fpath . zkbd << (Keyboard Definition)>> . zmv [ -finqQsvwW ] [ -C | -L | -M | -{p|P} program ] [ -o optstring ] srcpat dest ( ) srcpat dest srcpat $1 $2 ... dest . zmv '(*).lis' '$1.txt' <> <> <> <> . EXTENDED_GLOB . . ( -f ) . $f () . . : -f . mv/cp/ln ( -o-f ). -i : . <> <> . . -n : . -q (bare glob qualifiers): . -Q (bare glob qualifiers). glob . -s (Symbolic) ln -L . -v (Verbose): . -w (wildcard) . -W -w ${1} .. ${N} . -C -L.TP -M cp ln mv ( ) . -p program program cp ln mv. `program -- oldname newname' oldname newname zmv . program . -P program -p program program -- . . -o optstring optstring cp ln mv . `-' . : zmv -v '(* *)' '${1// /_}' (underscore) . zmv -v '* *' '${f// /_}' $f . zmv fpath Functions/Misc/zmv zsh . zrecompile `Recompiling Functions' . zstyle+ context style value [ + subcontext style value ... ] `+' (context) . : zstyle+ ':foo:bar' style1 value1 \ +':baz' style2 value2 \ +':frob' style3 value3 style1 value1 :foo:bar style2 value2 :foo:bar:baz style3 value3 :foo:bar:frob . subcontext . (Styles) insert-tab zed `:completion:zed:*' TAB . . pager nslookup `:nslookup' . prompt rprompt nslookup `:nslookup' (prompt) . PS1 RPS1 ( EXPANSION OF PROMPT SEQUENCES zshmisc(1) ). zsh 5.9.2 July 12, 2026 ZSHCONTRIB(1)