A User's Guide to the Z-Shell
Peter Stephenson
2003/03/23
Table of Contents
Chapter 1: A short introduction
1.1: Other shells and other guides
1.2: Versions of zsh
1.3: Conventions
1.4: Acknowledgments
Chapter 2: What to put in your startup files
2.1: Types of shell: interactive and login shells
2.1.1: What is a login shell? Simple tests
2.2: All the startup files
2.3: Options
2.4: Parameters
2.5: What to put in your startup files
2.5.1: Compatibility options: SH_WORD_SPLIT
and
others
2.5.2: Options for csh junkies
2.5.3: The history mechanism: types of history
2.5.8: `Go faster' options for power users
2.5.13: Other path-like things
2.5.14: Version-specific things
Chapter 3: Dealing with basic shell syntax
3.1: External commands
3.2: Builtin commands
3.2.2: Other builtins just for speed
3.2.3: Builtins which change the shell's state
3.2.5: Command control and information commands
3.2.7: History control commands
3.2.8: Job control and process control
3.2.11: More precommand modifiers: exec
,
noglob
3.2.13: Handling options to functions and scripts
3.2.14: Random file control things
3.2.15: Don't watch this space, watch some other
3.3: Functions
3.4: Aliases
3.5: Command summary
3.6: Expansions and quotes
3.6.3: Process, parameter, command, arithmetic and brace expansion
3.7: Redirection: greater-thans and less-thans
3.7.3: Appending, here documents, here strings, read write
3.7.4: Clever tricks: exec and other file descriptors
3.8: Shell syntax: loops, (sub)shells and so on
3.8.1: Logical command connectors
3.8.3: Subshells and current shell constructs
3.8.4: Subshells and current shells
3.9: Emulation and portability
3.9.2: Making your own scripts and functions portable
3.10: Running scripts
Chapter 4: The Z-Shell Line Editor
4.1: Introducing zle
4.2: Basic editing
4.3: Fancier editing
4.3.1: Options controlling zle
4.3.2: The minibuffer and extended commands
4.3.3: Prefix (digit) arguments
4.3.4: Words, regions and marks
4.4: History and searching
4.4.1: Moving through the history
4.4.2: Searching through the history
4.4.3: Extracting words from the history
4.5: Binding keys and handling keymaps
4.5.3: Function keys and so on
4.5.4: Binding strings instead of commands
4.6: Advanced editing
4.6.2: The builtin vared and the function zed
4.7: Extending zle
4.7.2: Executing other widgets
4.7.3: Some special builtin widgets and their uses
4.7.4: Special parameters: normal text
4.7.5: Other special parameters
4.7.6: Reading keys and using the minibuffer
Chapter 5: Substitutions
5.1: Quoting
5.2: Modifiers and what they modify
5.3: Process Substitution
5.4: Parameter substitution
5.4.2: Using associative arrays
5.4.3: Substituted substitutions, top- and tailing, etc.
5.4.4: Flags for options: splitting and joining
5.4.5: Flags for options: GLOB_SUBST
and
RC_EXPAND_PARAM
5.4.6: Yet more parameter flags
5.4.7: A couple of parameter substitution tricks
5.4.8: Nested parameter substitutions
5.5: That substitution again
5.6: Arithmetic Expansion
5.6.1: Entering and outputting bases
5.7: Brace Expansion and Arrays
5.8: Filename Expansion
5.9: Filename Generation and Pattern Matching
5.9.1: Comparing patterns and regular expressions
5.9.3: Extensions usually available
5.9.4: Extensions requiring EXTENDED_GLOB
5.9.7: Globbing flags: alter the behaviour of matches
Chapter 6: Completion, old and new
6.1: Completion and expansion
6.2: Configuring completion using shell options
6.2.3: Menu completion and menu selection
6.2.4: Other ways of changing completion behaviour
6.2.5: Changing the way completions are displayed
6.3: Getting started with new completion
6.4: How the shell finds the right completions
6.5: Configuring completion using styles
6.5.1: Specifying completers and their options
6.5.2: Changing the format of listings: groups etc.
6.5.3: Styles affecting particular completions
6.6: Command widgets
6.6.2: _correct_word
, _correct_filename
,
_expand_word
6.6.9: predict-on
, incremental-complete-word
6.7: Matching control and controlling where things are inserted
6.7.1: Case-insensitive matching
6.7.3: Partial word completion
6.7.5: Partial words with capitals
6.8: Tutorial
6.8.2: Subcommand completion: _arguments
6.8.3: Completing particular argument types
6.9: Writing new completion functions and widgets
6.9.1: Loading completion functions: compdef
6.9.2: Adding a set of completions: compadd
6.9.3: Functions for generating filenames, etc.
6.9.4: The zsh/parameter
module
6.9.5: Special completion parameters and
compset
6.9.6: Fancier completion: using the tags and styles mechanism
6.9.7: Getting the work done for you: handling arguments etc.
6.9.8: More completion utility functions
6.10: Finally
Chapter 7: Modules and other bits and pieces Not written
7.1: Control over modules: zmodload
7.1.1: Modules defining parameters
7.1.2: Low-level system interaction