Add User Guide
@ -36,15 +36,9 @@ for file in "${_zsh_html_src_dir}"/*.html; do
|
|||||||
sed -i '/\[\]{#/d' "$file"
|
sed -i '/\[\]{#/d' "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Rename file extensions from html to md, preserving the original file's name,
|
|
||||||
# and move them to _zsh_md_src for staging
|
|
||||||
for file in "${_zsh_html_src_dir}"/*.html; do
|
|
||||||
mv -- "$file" "${_zsh_md_src_dir}/$(basename -- "$file" .html).md"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Convert html to md with pandoc
|
# Convert html to md with pandoc
|
||||||
for file in "${_zsh_md_src_dir}"/*.md; do
|
for file in "${_zsh_html_src_dir}"/*.html; do
|
||||||
pandoc "$file" -f html -t gfm -o "$file";
|
pandoc "$file" -f html -t gfm -o "${_zsh_md_src_dir}/$(basename -- "$file" .html).md";
|
||||||
done
|
done
|
||||||
|
|
||||||
# Move md files to mdbook_src_dir
|
# Move md files to mdbook_src_dir
|
||||||
@ -56,13 +50,13 @@ done
|
|||||||
doctoc "${_mdbook_src_dir}"/*.md
|
doctoc "${_mdbook_src_dir}"/*.md
|
||||||
|
|
||||||
# Generate SUMMARY.md from zsh_toc.html
|
# Generate SUMMARY.md from zsh_toc.html
|
||||||
python3 "${PWD}/generate_summary.py" > "${_mdbook_src_dir}/SUMMARY.md"
|
python3 "${PWD}/gen_summ_manual.py" > "${_mdbook_src_dir}/SUMMARY.md"
|
||||||
|
|
||||||
# Copy md files to mdbook src
|
# Copy md files to mdbook src
|
||||||
# First ensure the src directory is empty
|
# First ensure the src directory is empty
|
||||||
rm -rf "${PWD}/src"
|
rm -rf "${PWD}/zsh_manual/src"
|
||||||
mkdir "${PWD}/src"
|
mkdir "${PWD}/zsh_manual/src"
|
||||||
cp -rf "${_mdbook_src_dir}"/* "${PWD}/src/"
|
cp -rf "${_mdbook_src_dir}"/* "${PWD}/zsh_manual/src/"
|
||||||
|
|
||||||
# Cleanup zsh_doc_tmp
|
# Cleanup zsh_doc_tmp
|
||||||
rm -rf "${_zsh_doc_tmp_dir}"
|
rm -rf "${_zsh_doc_tmp_dir}"
|
6
zsh_guide/book.toml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[book]
|
||||||
|
authors = ["Jeffrey Serio"]
|
||||||
|
language = "en"
|
||||||
|
multilingual = false
|
||||||
|
src = "src"
|
||||||
|
title = "Zsh User's Guide"
|
239
zsh_guide/book/404.html
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en" class="sidebar-visible no-js light">
|
||||||
|
<head>
|
||||||
|
<!-- Book generated using mdBook -->
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title></title>
|
||||||
|
|
||||||
|
|
||||||
|
<base href="/">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Custom HTML head -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.svg">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="favicon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/variables.css">
|
||||||
|
<link rel="stylesheet" href="css/general.css">
|
||||||
|
<link rel="stylesheet" href="css/chrome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/print.css" media="print">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="fonts/fonts.css">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Highlight.js Stylesheets -->
|
||||||
|
<link rel="stylesheet" href="highlight.css">
|
||||||
|
<link rel="stylesheet" href="tomorrow-night.css">
|
||||||
|
<link rel="stylesheet" href="ayu-highlight.css">
|
||||||
|
|
||||||
|
<!-- Custom theme stylesheets -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Provide site root to javascript -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var path_to_root = "";
|
||||||
|
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
try {
|
||||||
|
var theme = localStorage.getItem('mdbook-theme');
|
||||||
|
var sidebar = localStorage.getItem('mdbook-sidebar');
|
||||||
|
|
||||||
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var theme;
|
||||||
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
||||||
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
html.classList.remove('no-js')
|
||||||
|
html.classList.remove('light')
|
||||||
|
html.classList.add(theme);
|
||||||
|
html.classList.add('js');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Hide / unhide sidebar before it is displayed -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
var sidebar = 'hidden';
|
||||||
|
if (document.body.clientWidth >= 1080) {
|
||||||
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
||||||
|
sidebar = sidebar || 'visible';
|
||||||
|
}
|
||||||
|
html.classList.remove('sidebar-visible');
|
||||||
|
html.classList.add("sidebar-" + sidebar);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
||||||
|
<div class="sidebar-scrollbox">
|
||||||
|
<ol class="chapter"><li class="chapter-item expanded affix "><a href="zshguide.html">A User's Guide to the Z-Shell</a></li><li class="chapter-item expanded "><a href="zshguide01.html"><strong aria-hidden="true">1.</strong> A short introduction</a></li><li class="chapter-item expanded "><a href="zshguide02.html"><strong aria-hidden="true">2.</strong> What to put in your startup files</a></li><li class="chapter-item expanded "><a href="zshguide03.html"><strong aria-hidden="true">3.</strong> Dealing with basic shell syntax</a></li><li class="chapter-item expanded "><a href="zshguide04.html"><strong aria-hidden="true">4.</strong> The Z-Shell Line Editor</a></li><li class="chapter-item expanded "><a href="zshguide05.html"><strong aria-hidden="true">5.</strong> Substitutions</a></li><li class="chapter-item expanded "><a href="zshguide06.html"><strong aria-hidden="true">6.</strong> Completion, old and new</a></li><li class="chapter-item expanded "><a href="zshguide07.html"><strong aria-hidden="true">7.</strong> Modules and other bits and pieces Not written</a></li></ol>
|
||||||
|
</div>
|
||||||
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div id="page-wrapper" class="page-wrapper">
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
|
||||||
|
<div id="menu-bar-hover-placeholder"></div>
|
||||||
|
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||||
|
<div class="left-buttons">
|
||||||
|
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||||
|
<i class="fa fa-bars"></i>
|
||||||
|
</button>
|
||||||
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
||||||
|
<i class="fa fa-paint-brush"></i>
|
||||||
|
</button>
|
||||||
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="menu-title">Zsh User's Guide</h1>
|
||||||
|
|
||||||
|
<div class="right-buttons">
|
||||||
|
|
||||||
|
<a href="print.html" title="Print this book" aria-label="Print this book">
|
||||||
|
<i id="print-button" class="fa fa-print"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="search-wrapper" class="hidden">
|
||||||
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
|
</form>
|
||||||
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
|
<div id="searchresults-header" class="searchresults-header"></div>
|
||||||
|
<ul id="searchresults">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
||||||
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
||||||
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
||||||
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="content" class="content">
|
||||||
|
<main>
|
||||||
|
<h1 id="document-not-found-404"><a class="header" href="#document-not-found-404">Document not found (404)</a></h1>
|
||||||
|
<p>This URL is invalid, sorry. Please use the navigation bar or search to continue.</p>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||||
|
<!-- Mobile navigation buttons -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Livereload script (if served using the cli tool) -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var socket = new WebSocket("ws://localhost:3000/__livereload");
|
||||||
|
socket.onmessage = function (event) {
|
||||||
|
if (event.data === "reload") {
|
||||||
|
socket.close();
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.onbeforeunload = function() {
|
||||||
|
socket.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.playground_copyable = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="book.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
<!-- Custom JS scripts -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
467
zsh_guide/book/index.html
Normal file
@ -0,0 +1,467 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en" class="sidebar-visible no-js light">
|
||||||
|
<head>
|
||||||
|
<!-- Book generated using mdBook -->
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>A User's Guide to the Z-Shell - Zsh User's Guide</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Custom HTML head -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.svg">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="favicon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/variables.css">
|
||||||
|
<link rel="stylesheet" href="css/general.css">
|
||||||
|
<link rel="stylesheet" href="css/chrome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/print.css" media="print">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="fonts/fonts.css">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Highlight.js Stylesheets -->
|
||||||
|
<link rel="stylesheet" href="highlight.css">
|
||||||
|
<link rel="stylesheet" href="tomorrow-night.css">
|
||||||
|
<link rel="stylesheet" href="ayu-highlight.css">
|
||||||
|
|
||||||
|
<!-- Custom theme stylesheets -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Provide site root to javascript -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var path_to_root = "";
|
||||||
|
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
try {
|
||||||
|
var theme = localStorage.getItem('mdbook-theme');
|
||||||
|
var sidebar = localStorage.getItem('mdbook-sidebar');
|
||||||
|
|
||||||
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var theme;
|
||||||
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
||||||
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
html.classList.remove('no-js')
|
||||||
|
html.classList.remove('light')
|
||||||
|
html.classList.add(theme);
|
||||||
|
html.classList.add('js');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Hide / unhide sidebar before it is displayed -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
var sidebar = 'hidden';
|
||||||
|
if (document.body.clientWidth >= 1080) {
|
||||||
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
||||||
|
sidebar = sidebar || 'visible';
|
||||||
|
}
|
||||||
|
html.classList.remove('sidebar-visible');
|
||||||
|
html.classList.add("sidebar-" + sidebar);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
||||||
|
<div class="sidebar-scrollbox">
|
||||||
|
<ol class="chapter"><li class="chapter-item expanded affix "><a href="zshguide.html">A User's Guide to the Z-Shell</a></li><li class="chapter-item expanded "><a href="zshguide01.html"><strong aria-hidden="true">1.</strong> A short introduction</a></li><li class="chapter-item expanded "><a href="zshguide02.html"><strong aria-hidden="true">2.</strong> What to put in your startup files</a></li><li class="chapter-item expanded "><a href="zshguide03.html"><strong aria-hidden="true">3.</strong> Dealing with basic shell syntax</a></li><li class="chapter-item expanded "><a href="zshguide04.html"><strong aria-hidden="true">4.</strong> The Z-Shell Line Editor</a></li><li class="chapter-item expanded "><a href="zshguide05.html"><strong aria-hidden="true">5.</strong> Substitutions</a></li><li class="chapter-item expanded "><a href="zshguide06.html"><strong aria-hidden="true">6.</strong> Completion, old and new</a></li><li class="chapter-item expanded "><a href="zshguide07.html"><strong aria-hidden="true">7.</strong> Modules and other bits and pieces Not written</a></li></ol>
|
||||||
|
</div>
|
||||||
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div id="page-wrapper" class="page-wrapper">
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
|
||||||
|
<div id="menu-bar-hover-placeholder"></div>
|
||||||
|
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||||
|
<div class="left-buttons">
|
||||||
|
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||||
|
<i class="fa fa-bars"></i>
|
||||||
|
</button>
|
||||||
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
||||||
|
<i class="fa fa-paint-brush"></i>
|
||||||
|
</button>
|
||||||
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="menu-title">Zsh User's Guide</h1>
|
||||||
|
|
||||||
|
<div class="right-buttons">
|
||||||
|
|
||||||
|
<a href="print.html" title="Print this book" aria-label="Print this book">
|
||||||
|
<i id="print-button" class="fa fa-print"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="search-wrapper" class="hidden">
|
||||||
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
|
</form>
|
||||||
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
|
<div id="searchresults-header" class="searchresults-header"></div>
|
||||||
|
<ul id="searchresults">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
||||||
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
||||||
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
||||||
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="content" class="content">
|
||||||
|
<main>
|
||||||
|
<hr />
|
||||||
|
<h1 id="a-users-guide-to-the-z-shell"><a class="header" href="#a-users-guide-to-the-z-shell">A User's Guide to the Z-Shell</a></h1>
|
||||||
|
<h2 id="peter-stephenson"><a class="header" href="#peter-stephenson">Peter Stephenson</a></h2>
|
||||||
|
<h2 id="20030323"><a class="header" href="#20030323">2003/03/23</a></h2>
|
||||||
|
<h1 id="table-of-contents"><a class="header" href="#table-of-contents">Table of Contents</a></h1>
|
||||||
|
<h2 id="a-hrefzshguide01htmll1chapter-1-a-short-introductiona"><a class="header" href="#a-hrefzshguide01htmll1chapter-1-a-short-introductiona"><a href="zshguide01.html#l1">Chapter 1: A short introduction</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide01htmll211-other-shells-and-other-guidesa"><a class="header" href="#a-hrefzshguide01htmll211-other-shells-and-other-guidesa"><a href="zshguide01.html#l2">1.1: Other shells and other guides</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide01htmll312-versions-of-zsha"><a class="header" href="#a-hrefzshguide01htmll312-versions-of-zsha"><a href="zshguide01.html#l3">1.2: Versions of zsh</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide01htmll413-conventionsa"><a class="header" href="#a-hrefzshguide01htmll413-conventionsa"><a href="zshguide01.html#l4">1.3: Conventions</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide01htmll514-acknowledgmentsa"><a class="header" href="#a-hrefzshguide01htmll514-acknowledgmentsa"><a href="zshguide01.html#l5">1.4: Acknowledgments</a></a></h3>
|
||||||
|
<h2 id="a-hrefzshguide02htmll6chapter-2-what-to-put-in-your-startup-filesa"><a class="header" href="#a-hrefzshguide02htmll6chapter-2-what-to-put-in-your-startup-filesa"><a href="zshguide02.html#l6">Chapter 2: What to put in your startup files</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide02htmll721-types-of-shell-interactive-and-login-shellsa"><a class="header" href="#a-hrefzshguide02htmll721-types-of-shell-interactive-and-login-shellsa"><a href="zshguide02.html#l7">2.1: Types of shell: interactive and login shells</a></a></h3>
|
||||||
|
<p><a href="zshguide02.html#l8">2.1.1: What is a login shell? Simple tests</a></p>
|
||||||
|
<h3 id="a-hrefzshguide02htmll922-all-the-startup-filesa"><a class="header" href="#a-hrefzshguide02htmll922-all-the-startup-filesa"><a href="zshguide02.html#l9">2.2: All the startup files</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide02htmll1023-optionsa"><a class="header" href="#a-hrefzshguide02htmll1023-optionsa"><a href="zshguide02.html#l10">2.3: Options</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide02htmll1124-parametersa"><a class="header" href="#a-hrefzshguide02htmll1124-parametersa"><a href="zshguide02.html#l11">2.4: Parameters</a></a></h3>
|
||||||
|
<p><a href="zshguide02.html#l12">2.4.1: Arrays</a></p>
|
||||||
|
<h3 id="a-hrefzshguide02htmll1325-what-to-put-in-your-startup-filesa"><a class="header" href="#a-hrefzshguide02htmll1325-what-to-put-in-your-startup-filesa"><a href="zshguide02.html#l13">2.5: What to put in your startup files</a></a></h3>
|
||||||
|
<p><a href="zshguide02.html#l14">2.5.1: Compatibility options: <code>SH_WORD_SPLIT</code> and
|
||||||
|
others</a></p>
|
||||||
|
<p><a href="zshguide02.html#l15">2.5.2: Options for csh junkies</a></p>
|
||||||
|
<p><a href="zshguide02.html#l16">2.5.3: The history mechanism: types of history</a></p>
|
||||||
|
<p><a href="zshguide02.html#l17">2.5.4: Setting up history</a></p>
|
||||||
|
<p><a href="zshguide02.html#l18">2.5.5: History options</a></p>
|
||||||
|
<p><a href="zshguide02.html#l19">2.5.6: Prompts</a></p>
|
||||||
|
<p><a href="zshguide02.html#l20">2.5.7: Named directories</a></p>
|
||||||
|
<p><a href="zshguide02.html#l21">2.5.8: `Go faster' options for power users</a></p>
|
||||||
|
<p><a href="zshguide02.html#l22">2.5.9: aliases</a></p>
|
||||||
|
<p><a href="zshguide02.html#l23">2.5.10: Environment variables</a></p>
|
||||||
|
<p><a href="zshguide02.html#l24">2.5.11: Path</a></p>
|
||||||
|
<p><a href="zshguide02.html#l25">2.5.12: Mail</a></p>
|
||||||
|
<p><a href="zshguide02.html#l26">2.5.13: Other path-like things</a></p>
|
||||||
|
<p><a href="zshguide02.html#l27">2.5.14: Version-specific things</a></p>
|
||||||
|
<p><a href="zshguide02.html#l28">2.5.15: Everything else</a></p>
|
||||||
|
<h2 id="a-hrefzshguide03htmll29chapter-3-dealing-with-basic-shell-syntaxa"><a class="header" href="#a-hrefzshguide03htmll29chapter-3-dealing-with-basic-shell-syntaxa"><a href="zshguide03.html#l29">Chapter 3: Dealing with basic shell syntax</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide03htmll3031-external-commandsa"><a class="header" href="#a-hrefzshguide03htmll3031-external-commandsa"><a href="zshguide03.html#l30">3.1: External commands</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide03htmll3132-builtin-commandsa"><a class="header" href="#a-hrefzshguide03htmll3132-builtin-commandsa"><a href="zshguide03.html#l31">3.2: Builtin commands</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l32">3.2.1: Builtins for printing</a></p>
|
||||||
|
<p><a href="zshguide03.html#l33">3.2.2: Other builtins just for speed</a></p>
|
||||||
|
<p><a href="zshguide03.html#l34">3.2.3: Builtins which change the shell's state</a></p>
|
||||||
|
<p><a href="zshguide03.html#l35">3.2.4: cd and friends</a></p>
|
||||||
|
<p><a href="zshguide03.html#l36">3.2.5: Command control and information commands</a></p>
|
||||||
|
<p><a href="zshguide03.html#l37">3.2.6: Parameter control</a></p>
|
||||||
|
<p><a href="zshguide03.html#l38">3.2.7: History control commands</a></p>
|
||||||
|
<p><a href="zshguide03.html#l39">3.2.8: Job control and process control</a></p>
|
||||||
|
<p><a href="zshguide03.html#l40">3.2.9: Terminals, users, etc.</a></p>
|
||||||
|
<p><a href="zshguide03.html#l41">3.2.10: Syntactic oddments</a></p>
|
||||||
|
<p><a href="zshguide03.html#l42">3.2.11: More precommand modifiers: <code>exec</code>,
|
||||||
|
<code>noglob</code></a></p>
|
||||||
|
<p><a href="zshguide03.html#l43">3.2.12: Testing things</a></p>
|
||||||
|
<p><a href="zshguide03.html#l44">3.2.13: Handling options to functions and scripts</a></p>
|
||||||
|
<p><a href="zshguide03.html#l45">3.2.14: Random file control things</a></p>
|
||||||
|
<p><a href="zshguide03.html#l46">3.2.15: Don't watch this space, watch some other</a></p>
|
||||||
|
<p><a href="zshguide03.html#l47">3.2.16: And also</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll4833-functionsa"><a class="header" href="#a-hrefzshguide03htmll4833-functionsa"><a href="zshguide03.html#l48">3.3: Functions</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l49">3.3.1: Loading functions</a></p>
|
||||||
|
<p><a href="zshguide03.html#l50">3.3.2: Function parameters</a></p>
|
||||||
|
<p><a href="zshguide03.html#l51">3.3.3: Compiling functions</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll5234-aliasesa"><a class="header" href="#a-hrefzshguide03htmll5234-aliasesa"><a href="zshguide03.html#l52">3.4: Aliases</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide03htmll5335-command-summarya"><a class="header" href="#a-hrefzshguide03htmll5335-command-summarya"><a href="zshguide03.html#l53">3.5: Command summary</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide03htmll5436-expansions-and-quotesa"><a class="header" href="#a-hrefzshguide03htmll5436-expansions-and-quotesa"><a href="zshguide03.html#l54">3.6: Expansions and quotes</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l55">3.6.1: History expansion</a></p>
|
||||||
|
<p><a href="zshguide03.html#l56">3.6.2: Alias expansion</a></p>
|
||||||
|
<p><a href="zshguide03.html#l57">3.6.3: Process, parameter, command, arithmetic and brace
|
||||||
|
expansion</a></p>
|
||||||
|
<p><a href="zshguide03.html#l58">3.6.4: Filename Expansion</a></p>
|
||||||
|
<p><a href="zshguide03.html#l59">3.6.5: Filename Generation</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll6037-redirection-greater-thans-and-less-thansa"><a class="header" href="#a-hrefzshguide03htmll6037-redirection-greater-thans-and-less-thansa"><a href="zshguide03.html#l60">3.7: Redirection: greater-thans and less-thans</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l61">3.7.1: Clobber</a></p>
|
||||||
|
<p><a href="zshguide03.html#l62">3.7.2: File descriptors</a></p>
|
||||||
|
<p><a href="zshguide03.html#l63">3.7.3: Appending, here documents, here strings, read
|
||||||
|
write</a></p>
|
||||||
|
<p><a href="zshguide03.html#l64">3.7.4: Clever tricks: exec and other file
|
||||||
|
descriptors</a></p>
|
||||||
|
<p><a href="zshguide03.html#l65">3.7.5: Multios</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll6638-shell-syntax-loops-subshells-and-so-ona"><a class="header" href="#a-hrefzshguide03htmll6638-shell-syntax-loops-subshells-and-so-ona"><a href="zshguide03.html#l66">3.8: Shell syntax: loops, (sub)shells and so on</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l67">3.8.1: Logical command connectors</a></p>
|
||||||
|
<p><a href="zshguide03.html#l68">3.8.2: Structures</a></p>
|
||||||
|
<p><a href="zshguide03.html#l69">3.8.3: Subshells and current shell constructs</a></p>
|
||||||
|
<p><a href="zshguide03.html#l70">3.8.4: Subshells and current shells</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll7139-emulation-and-portabilitya"><a class="header" href="#a-hrefzshguide03htmll7139-emulation-and-portabilitya"><a href="zshguide03.html#l71">3.9: Emulation and portability</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l72">3.9.1: Differences in detail</a></p>
|
||||||
|
<p><a href="zshguide03.html#l73">3.9.2: Making your own scripts and functions
|
||||||
|
portable</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll74310-running-scriptsa"><a class="header" href="#a-hrefzshguide03htmll74310-running-scriptsa"><a href="zshguide03.html#l74">3.10: Running scripts</a></a></h3>
|
||||||
|
<h2 id="a-hrefzshguide04htmll75chapter-4-the-z-shell-line-editora"><a class="header" href="#a-hrefzshguide04htmll75chapter-4-the-z-shell-line-editora"><a href="zshguide04.html#l75">Chapter 4: The Z-Shell Line Editor</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide04htmll7641-introducing-zlea"><a class="header" href="#a-hrefzshguide04htmll7641-introducing-zlea"><a href="zshguide04.html#l76">4.1: Introducing zle</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l77">4.1.1: The simple facts</a></p>
|
||||||
|
<p><a href="zshguide04.html#l78">4.1.2: Vi mode</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll7942-basic-editinga"><a class="header" href="#a-hrefzshguide04htmll7942-basic-editinga"><a href="zshguide04.html#l79">4.2: Basic editing</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l80">4.2.1: Moving</a></p>
|
||||||
|
<p><a href="zshguide04.html#l81">4.2.2: Deleting</a></p>
|
||||||
|
<p><a href="zshguide04.html#l82">4.2.3: More deletion</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll8343-fancier-editinga"><a class="header" href="#a-hrefzshguide04htmll8343-fancier-editinga"><a href="zshguide04.html#l83">4.3: Fancier editing</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l84">4.3.1: Options controlling zle</a></p>
|
||||||
|
<p><a href="zshguide04.html#l85">4.3.2: The minibuffer and extended commands</a></p>
|
||||||
|
<p><a href="zshguide04.html#l86">4.3.3: Prefix (digit) arguments</a></p>
|
||||||
|
<p><a href="zshguide04.html#l87">4.3.4: Words, regions and marks</a></p>
|
||||||
|
<p><a href="zshguide04.html#l88">4.3.5: Regions and marks</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll8944-history-and-searchinga"><a class="header" href="#a-hrefzshguide04htmll8944-history-and-searchinga"><a href="zshguide04.html#l89">4.4: History and searching</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l90">4.4.1: Moving through the history</a></p>
|
||||||
|
<p><a href="zshguide04.html#l91">4.4.2: Searching through the history</a></p>
|
||||||
|
<p><a href="zshguide04.html#l92">4.4.3: Extracting words from the history</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll9345-binding-keys-and-handling-keymapsa"><a class="header" href="#a-hrefzshguide04htmll9345-binding-keys-and-handling-keymapsa"><a href="zshguide04.html#l93">4.5: Binding keys and handling keymaps</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l94">4.5.1: Simple key bindings</a></p>
|
||||||
|
<p><a href="zshguide04.html#l95">4.5.2: Removing key bindings</a></p>
|
||||||
|
<p><a href="zshguide04.html#l96">4.5.3: Function keys and so on</a></p>
|
||||||
|
<p><a href="zshguide04.html#l97">4.5.4: Binding strings instead of commands</a></p>
|
||||||
|
<p><a href="zshguide04.html#l98">4.5.5: Keymaps</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll9946-advanced-editinga"><a class="header" href="#a-hrefzshguide04htmll9946-advanced-editinga"><a href="zshguide04.html#l99">4.6: Advanced editing</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l100">4.6.1: Multi-line editing</a></p>
|
||||||
|
<p><a href="zshguide04.html#l101">4.6.2: The builtin vared and the function zed</a></p>
|
||||||
|
<p><a href="zshguide04.html#l102">4.6.3: The buffer stack</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll10347-extending-zlea"><a class="header" href="#a-hrefzshguide04htmll10347-extending-zlea"><a href="zshguide04.html#l103">4.7: Extending zle</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l104">4.7.1: Widgets</a></p>
|
||||||
|
<p><a href="zshguide04.html#l105">4.7.2: Executing other widgets</a></p>
|
||||||
|
<p><a href="zshguide04.html#l106">4.7.3: Some special builtin widgets and their
|
||||||
|
uses</a></p>
|
||||||
|
<p><a href="zshguide04.html#l107">4.7.4: Special parameters: normal text</a></p>
|
||||||
|
<p><a href="zshguide04.html#l108">4.7.5: Other special parameters</a></p>
|
||||||
|
<p><a href="zshguide04.html#l109">4.7.6: Reading keys and using the minibuffer</a></p>
|
||||||
|
<p><a href="zshguide04.html#l110">4.7.7: Examples</a></p>
|
||||||
|
<h2 id="a-hrefzshguide05htmll111chapter-5-substitutionsa"><a class="header" href="#a-hrefzshguide05htmll111chapter-5-substitutionsa"><a href="zshguide05.html#l111">Chapter 5: Substitutions</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide05htmll11251-quotinga"><a class="header" href="#a-hrefzshguide05htmll11251-quotinga"><a href="zshguide05.html#l112">5.1: Quoting</a></a></h3>
|
||||||
|
<p><a href="zshguide05.html#l113">5.1.1: Backslashes</a></p>
|
||||||
|
<p><a href="zshguide05.html#l114">5.1.2: Single quotes</a></p>
|
||||||
|
<p><a href="zshguide05.html#l115">5.1.3: POSIX quotes</a></p>
|
||||||
|
<p><a href="zshguide05.html#l116">5.1.4: Double quotes</a></p>
|
||||||
|
<p><a href="zshguide05.html#l117">5.1.5: Backquotes</a></p>
|
||||||
|
<h3 id="a-hrefzshguide05htmll11852-modifiers-and-what-they-modifya"><a class="header" href="#a-hrefzshguide05htmll11852-modifiers-and-what-they-modifya"><a href="zshguide05.html#l118">5.2: Modifiers and what they modify</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll11953-process-substitutiona"><a class="header" href="#a-hrefzshguide05htmll11953-process-substitutiona"><a href="zshguide05.html#l119">5.3: Process Substitution</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll12054-parameter-substitutiona"><a class="header" href="#a-hrefzshguide05htmll12054-parameter-substitutiona"><a href="zshguide05.html#l120">5.4: Parameter substitution</a></a></h3>
|
||||||
|
<p><a href="zshguide05.html#l121">5.4.1: Using arrays</a></p>
|
||||||
|
<p><a href="zshguide05.html#l122">5.4.2: Using associative arrays</a></p>
|
||||||
|
<p><a href="zshguide05.html#l123">5.4.3: Substituted substitutions, top- and tailing,
|
||||||
|
etc.</a></p>
|
||||||
|
<p><a href="zshguide05.html#l124">5.4.4: Flags for options: splitting and joining</a></p>
|
||||||
|
<p><a href="zshguide05.html#l125">5.4.5: Flags for options: <code>GLOB_SUBST</code> and
|
||||||
|
<code>RC_EXPAND_PARAM</code></a></p>
|
||||||
|
<p><a href="zshguide05.html#l126">5.4.6: Yet more parameter flags</a></p>
|
||||||
|
<p><a href="zshguide05.html#l127">5.4.7: A couple of parameter substitution tricks</a></p>
|
||||||
|
<p><a href="zshguide05.html#l128">5.4.8: Nested parameter substitutions</a></p>
|
||||||
|
<h3 id="a-hrefzshguide05htmll12955-that-substitution-againa"><a class="header" href="#a-hrefzshguide05htmll12955-that-substitution-againa"><a href="zshguide05.html#l129">5.5: That substitution again</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll13056-arithmetic-expansiona"><a class="header" href="#a-hrefzshguide05htmll13056-arithmetic-expansiona"><a href="zshguide05.html#l130">5.6: Arithmetic Expansion</a></a></h3>
|
||||||
|
<p><a href="zshguide05.html#l131">5.6.1: Entering and outputting bases</a></p>
|
||||||
|
<p><a href="zshguide05.html#l132">5.6.2: Parameter typing</a></p>
|
||||||
|
<h3 id="a-hrefzshguide05htmll13357-brace-expansion-and-arraysa"><a class="header" href="#a-hrefzshguide05htmll13357-brace-expansion-and-arraysa"><a href="zshguide05.html#l133">5.7: Brace Expansion and Arrays</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll13458-filename-expansiona"><a class="header" href="#a-hrefzshguide05htmll13458-filename-expansiona"><a href="zshguide05.html#l134">5.8: Filename Expansion</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll13559-filename-generation-and-pattern-matchinga"><a class="header" href="#a-hrefzshguide05htmll13559-filename-generation-and-pattern-matchinga"><a href="zshguide05.html#l135">5.9: Filename Generation and Pattern Matching</a></a></h3>
|
||||||
|
<p><a href="zshguide05.html#l136">5.9.1: Comparing patterns and regular
|
||||||
|
expressions</a></p>
|
||||||
|
<p><a href="zshguide05.html#l137">5.9.2: Standard features</a></p>
|
||||||
|
<p><a href="zshguide05.html#l138">5.9.3: Extensions usually available</a></p>
|
||||||
|
<p><a href="zshguide05.html#l139">5.9.4: Extensions requiring <code>EXTENDED_GLOB</code></a></p>
|
||||||
|
<p><a href="zshguide05.html#l140">5.9.5: Recursive globbing</a></p>
|
||||||
|
<p><a href="zshguide05.html#l141">5.9.6: Glob qualifiers</a></p>
|
||||||
|
<p><a href="zshguide05.html#l142">5.9.7: Globbing flags: alter the behaviour of
|
||||||
|
matches</a></p>
|
||||||
|
<p><a href="zshguide05.html#l143">5.9.8: The function <code>zmv</code></a></p>
|
||||||
|
<h2 id="a-hrefzshguide06htmll144chapter-6-completion-old-and-newa"><a class="header" href="#a-hrefzshguide06htmll144chapter-6-completion-old-and-newa"><a href="zshguide06.html#l144">Chapter 6: Completion, old and new</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide06htmll14561-completion-and-expansiona"><a class="header" href="#a-hrefzshguide06htmll14561-completion-and-expansiona"><a href="zshguide06.html#l145">6.1: Completion and expansion</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide06htmll14662-configuring-completion-using-shell-optionsa"><a class="header" href="#a-hrefzshguide06htmll14662-configuring-completion-using-shell-optionsa"><a href="zshguide06.html#l146">6.2: Configuring completion using shell options</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l147">6.2.1: Ambiguous completions</a></p>
|
||||||
|
<p><a href="zshguide06.html#l148">6.2.2: <code>ALWAYS_LAST_PROMPT</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l149">6.2.3: Menu completion and menu selection</a></p>
|
||||||
|
<p><a href="zshguide06.html#l150">6.2.4: Other ways of changing completion
|
||||||
|
behaviour</a></p>
|
||||||
|
<p><a href="zshguide06.html#l151">6.2.5: Changing the way completions are
|
||||||
|
displayed</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll15263-getting-started-with-new-completiona"><a class="header" href="#a-hrefzshguide06htmll15263-getting-started-with-new-completiona"><a href="zshguide06.html#l152">6.3: Getting started with new completion</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide06htmll15364-how-the-shell-finds-the-right-completionsa"><a class="header" href="#a-hrefzshguide06htmll15364-how-the-shell-finds-the-right-completionsa"><a href="zshguide06.html#l153">6.4: How the shell finds the right completions</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l154">6.4.1: Contexts</a></p>
|
||||||
|
<p><a href="zshguide06.html#l155">6.4.2: Tags</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll15665-configuring-completion-using-stylesa"><a class="header" href="#a-hrefzshguide06htmll15665-configuring-completion-using-stylesa"><a href="zshguide06.html#l156">6.5: Configuring completion using styles</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l157">6.5.1: Specifying completers and their options</a></p>
|
||||||
|
<p><a href="zshguide06.html#l158">6.5.2: Changing the format of listings: groups
|
||||||
|
etc.</a></p>
|
||||||
|
<p><a href="zshguide06.html#l159">6.5.3: Styles affecting particular completions</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll16066-command-widgetsa"><a class="header" href="#a-hrefzshguide06htmll16066-command-widgetsa"><a href="zshguide06.html#l160">6.6: Command widgets</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l161">6.6.1: <code>_complete_help</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l162">6.6.2: <code>_correct_word</code>, <code>_correct_filename</code>,
|
||||||
|
<code>_expand_word</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l163">6.6.3: <code>_history_complete_word</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l164">6.6.4: <code>_most_recent_file</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l165">6.6.5: <code>_next_tags</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l166">6.6.6: <code>_bash_completions</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l167">6.6.7: <code>_read_comp</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l168">6.6.8: <code>_generic</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l169">6.6.9: <code>predict-on</code>, <code>incremental-complete-word</code></a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll17067-matching-control-and-controlling-where-things-are-inserteda"><a class="header" href="#a-hrefzshguide06htmll17067-matching-control-and-controlling-where-things-are-inserteda"><a href="zshguide06.html#l170">6.7: Matching control and controlling where things are inserted</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l171">6.7.1: Case-insensitive matching</a></p>
|
||||||
|
<p><a href="zshguide06.html#l172">6.7.2: Matching option names</a></p>
|
||||||
|
<p><a href="zshguide06.html#l173">6.7.3: Partial word completion</a></p>
|
||||||
|
<p><a href="zshguide06.html#l174">6.7.4: Substring completion</a></p>
|
||||||
|
<p><a href="zshguide06.html#l175">6.7.5: Partial words with capitals</a></p>
|
||||||
|
<p><a href="zshguide06.html#l176">6.7.6: Final notes</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll17768-tutoriala"><a class="header" href="#a-hrefzshguide06htmll17768-tutoriala"><a href="zshguide06.html#l177">6.8: Tutorial</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l178">6.8.1: The dispatcher</a></p>
|
||||||
|
<p><a href="zshguide06.html#l179">6.8.2: Subcommand completion: <code>_arguments</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l180">6.8.3: Completing particular argument types</a></p>
|
||||||
|
<p><a href="zshguide06.html#l181">6.8.4: The rest</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll18269-writing-new-completion-functions-and-widgetsa"><a class="header" href="#a-hrefzshguide06htmll18269-writing-new-completion-functions-and-widgetsa"><a href="zshguide06.html#l182">6.9: Writing new completion functions and widgets</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l183">6.9.1: Loading completion functions: <code>compdef</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l184">6.9.2: Adding a set of completions: <code>compadd</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l185">6.9.3: Functions for generating filenames, etc.</a></p>
|
||||||
|
<p><a href="zshguide06.html#l186">6.9.4: The <code>zsh/parameter</code> module</a></p>
|
||||||
|
<p><a href="zshguide06.html#l187">6.9.5: Special completion parameters and
|
||||||
|
<code>compset</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l188">6.9.6: Fancier completion: using the tags and styles
|
||||||
|
mechanism</a></p>
|
||||||
|
<p><a href="zshguide06.html#l189">6.9.7: Getting the work done for you: handling arguments
|
||||||
|
etc.</a></p>
|
||||||
|
<p><a href="zshguide06.html#l190">6.9.8: More completion utility functions</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll191610-finallya"><a class="header" href="#a-hrefzshguide06htmll191610-finallya"><a href="zshguide06.html#l191">6.10: Finally</a></a></h3>
|
||||||
|
<h2 id="a-hrefzshguide07htmll192chapter-7-modules-and-other-bits-and-pieces-not-writtena"><a class="header" href="#a-hrefzshguide07htmll192chapter-7-modules-and-other-bits-and-pieces-not-writtena"><a href="zshguide07.html#l192">Chapter 7: Modules and other bits and pieces <em>Not written</em></a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide07htmll19371-control-over-modules-zmodloada"><a class="header" href="#a-hrefzshguide07htmll19371-control-over-modules-zmodloada"><a href="zshguide07.html#l193">7.1: Control over modules: <code>zmodload</code></a></a></h3>
|
||||||
|
<p><a href="zshguide07.html#l194">7.1.1: Modules defining parameters</a></p>
|
||||||
|
<p><a href="zshguide07.html#l195">7.1.2: Low-level system interaction</a></p>
|
||||||
|
<p><a href="zshguide07.html#l196">7.1.3: ZFTP</a></p>
|
||||||
|
<h3 id="a-hrefzshguide07htmll19772-contributed-bitsa"><a class="header" href="#a-hrefzshguide07htmll19772-contributed-bitsa"><a href="zshguide07.html#l197">7.2: Contributed bits</a></a></h3>
|
||||||
|
<p><a href="zshguide07.html#l198">7.2.1: Prompt themes</a></p>
|
||||||
|
<h3 id="a-hrefzshguide07htmll19973-whats-new-in-41a"><a class="header" href="#a-hrefzshguide07htmll19973-whats-new-in-41a"><a href="zshguide07.html#l199">7.3: What's new in 4.1</a></a></h3>
|
||||||
|
<h2 id="a-hrefzshguide08htmll200appendix-1-obtaining-zsh-and-getting-more-information-not-writtena"><a class="header" href="#a-hrefzshguide08htmll200appendix-1-obtaining-zsh-and-getting-more-information-not-writtena"><a href="zshguide08.html#l200">Appendix 1: Obtaining zsh and getting more information <em>Not written</em></a></a></h2>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||||
|
<!-- Mobile navigation buttons -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a rel="next" href="zshguide01.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a rel="next" href="zshguide01.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Livereload script (if served using the cli tool) -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var socket = new WebSocket("ws://localhost:3000/__livereload");
|
||||||
|
socket.onmessage = function (event) {
|
||||||
|
if (event.data === "reload") {
|
||||||
|
socket.close();
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.onbeforeunload = function() {
|
||||||
|
socket.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.playground_copyable = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="book.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
<!-- Custom JS scripts -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
17740
zsh_guide/book/print.html
Normal file
1
zsh_guide/book/searchindex.js
Normal file
1
zsh_guide/book/searchindex.json
Normal file
467
zsh_guide/book/zshguide.html
Normal file
@ -0,0 +1,467 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en" class="sidebar-visible no-js light">
|
||||||
|
<head>
|
||||||
|
<!-- Book generated using mdBook -->
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>A User's Guide to the Z-Shell - Zsh User's Guide</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Custom HTML head -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.svg">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="favicon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/variables.css">
|
||||||
|
<link rel="stylesheet" href="css/general.css">
|
||||||
|
<link rel="stylesheet" href="css/chrome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/print.css" media="print">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="fonts/fonts.css">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Highlight.js Stylesheets -->
|
||||||
|
<link rel="stylesheet" href="highlight.css">
|
||||||
|
<link rel="stylesheet" href="tomorrow-night.css">
|
||||||
|
<link rel="stylesheet" href="ayu-highlight.css">
|
||||||
|
|
||||||
|
<!-- Custom theme stylesheets -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Provide site root to javascript -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var path_to_root = "";
|
||||||
|
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
try {
|
||||||
|
var theme = localStorage.getItem('mdbook-theme');
|
||||||
|
var sidebar = localStorage.getItem('mdbook-sidebar');
|
||||||
|
|
||||||
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var theme;
|
||||||
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
||||||
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
html.classList.remove('no-js')
|
||||||
|
html.classList.remove('light')
|
||||||
|
html.classList.add(theme);
|
||||||
|
html.classList.add('js');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Hide / unhide sidebar before it is displayed -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
var sidebar = 'hidden';
|
||||||
|
if (document.body.clientWidth >= 1080) {
|
||||||
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
||||||
|
sidebar = sidebar || 'visible';
|
||||||
|
}
|
||||||
|
html.classList.remove('sidebar-visible');
|
||||||
|
html.classList.add("sidebar-" + sidebar);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
||||||
|
<div class="sidebar-scrollbox">
|
||||||
|
<ol class="chapter"><li class="chapter-item expanded affix "><a href="zshguide.html" class="active">A User's Guide to the Z-Shell</a></li><li class="chapter-item expanded "><a href="zshguide01.html"><strong aria-hidden="true">1.</strong> A short introduction</a></li><li class="chapter-item expanded "><a href="zshguide02.html"><strong aria-hidden="true">2.</strong> What to put in your startup files</a></li><li class="chapter-item expanded "><a href="zshguide03.html"><strong aria-hidden="true">3.</strong> Dealing with basic shell syntax</a></li><li class="chapter-item expanded "><a href="zshguide04.html"><strong aria-hidden="true">4.</strong> The Z-Shell Line Editor</a></li><li class="chapter-item expanded "><a href="zshguide05.html"><strong aria-hidden="true">5.</strong> Substitutions</a></li><li class="chapter-item expanded "><a href="zshguide06.html"><strong aria-hidden="true">6.</strong> Completion, old and new</a></li><li class="chapter-item expanded "><a href="zshguide07.html"><strong aria-hidden="true">7.</strong> Modules and other bits and pieces Not written</a></li></ol>
|
||||||
|
</div>
|
||||||
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div id="page-wrapper" class="page-wrapper">
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
|
||||||
|
<div id="menu-bar-hover-placeholder"></div>
|
||||||
|
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||||
|
<div class="left-buttons">
|
||||||
|
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||||
|
<i class="fa fa-bars"></i>
|
||||||
|
</button>
|
||||||
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
||||||
|
<i class="fa fa-paint-brush"></i>
|
||||||
|
</button>
|
||||||
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="menu-title">Zsh User's Guide</h1>
|
||||||
|
|
||||||
|
<div class="right-buttons">
|
||||||
|
|
||||||
|
<a href="print.html" title="Print this book" aria-label="Print this book">
|
||||||
|
<i id="print-button" class="fa fa-print"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="search-wrapper" class="hidden">
|
||||||
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
|
</form>
|
||||||
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
|
<div id="searchresults-header" class="searchresults-header"></div>
|
||||||
|
<ul id="searchresults">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
||||||
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
||||||
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
||||||
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="content" class="content">
|
||||||
|
<main>
|
||||||
|
<hr />
|
||||||
|
<h1 id="a-users-guide-to-the-z-shell"><a class="header" href="#a-users-guide-to-the-z-shell">A User's Guide to the Z-Shell</a></h1>
|
||||||
|
<h2 id="peter-stephenson"><a class="header" href="#peter-stephenson">Peter Stephenson</a></h2>
|
||||||
|
<h2 id="20030323"><a class="header" href="#20030323">2003/03/23</a></h2>
|
||||||
|
<h1 id="table-of-contents"><a class="header" href="#table-of-contents">Table of Contents</a></h1>
|
||||||
|
<h2 id="a-hrefzshguide01htmll1chapter-1-a-short-introductiona"><a class="header" href="#a-hrefzshguide01htmll1chapter-1-a-short-introductiona"><a href="zshguide01.html#l1">Chapter 1: A short introduction</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide01htmll211-other-shells-and-other-guidesa"><a class="header" href="#a-hrefzshguide01htmll211-other-shells-and-other-guidesa"><a href="zshguide01.html#l2">1.1: Other shells and other guides</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide01htmll312-versions-of-zsha"><a class="header" href="#a-hrefzshguide01htmll312-versions-of-zsha"><a href="zshguide01.html#l3">1.2: Versions of zsh</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide01htmll413-conventionsa"><a class="header" href="#a-hrefzshguide01htmll413-conventionsa"><a href="zshguide01.html#l4">1.3: Conventions</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide01htmll514-acknowledgmentsa"><a class="header" href="#a-hrefzshguide01htmll514-acknowledgmentsa"><a href="zshguide01.html#l5">1.4: Acknowledgments</a></a></h3>
|
||||||
|
<h2 id="a-hrefzshguide02htmll6chapter-2-what-to-put-in-your-startup-filesa"><a class="header" href="#a-hrefzshguide02htmll6chapter-2-what-to-put-in-your-startup-filesa"><a href="zshguide02.html#l6">Chapter 2: What to put in your startup files</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide02htmll721-types-of-shell-interactive-and-login-shellsa"><a class="header" href="#a-hrefzshguide02htmll721-types-of-shell-interactive-and-login-shellsa"><a href="zshguide02.html#l7">2.1: Types of shell: interactive and login shells</a></a></h3>
|
||||||
|
<p><a href="zshguide02.html#l8">2.1.1: What is a login shell? Simple tests</a></p>
|
||||||
|
<h3 id="a-hrefzshguide02htmll922-all-the-startup-filesa"><a class="header" href="#a-hrefzshguide02htmll922-all-the-startup-filesa"><a href="zshguide02.html#l9">2.2: All the startup files</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide02htmll1023-optionsa"><a class="header" href="#a-hrefzshguide02htmll1023-optionsa"><a href="zshguide02.html#l10">2.3: Options</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide02htmll1124-parametersa"><a class="header" href="#a-hrefzshguide02htmll1124-parametersa"><a href="zshguide02.html#l11">2.4: Parameters</a></a></h3>
|
||||||
|
<p><a href="zshguide02.html#l12">2.4.1: Arrays</a></p>
|
||||||
|
<h3 id="a-hrefzshguide02htmll1325-what-to-put-in-your-startup-filesa"><a class="header" href="#a-hrefzshguide02htmll1325-what-to-put-in-your-startup-filesa"><a href="zshguide02.html#l13">2.5: What to put in your startup files</a></a></h3>
|
||||||
|
<p><a href="zshguide02.html#l14">2.5.1: Compatibility options: <code>SH_WORD_SPLIT</code> and
|
||||||
|
others</a></p>
|
||||||
|
<p><a href="zshguide02.html#l15">2.5.2: Options for csh junkies</a></p>
|
||||||
|
<p><a href="zshguide02.html#l16">2.5.3: The history mechanism: types of history</a></p>
|
||||||
|
<p><a href="zshguide02.html#l17">2.5.4: Setting up history</a></p>
|
||||||
|
<p><a href="zshguide02.html#l18">2.5.5: History options</a></p>
|
||||||
|
<p><a href="zshguide02.html#l19">2.5.6: Prompts</a></p>
|
||||||
|
<p><a href="zshguide02.html#l20">2.5.7: Named directories</a></p>
|
||||||
|
<p><a href="zshguide02.html#l21">2.5.8: `Go faster' options for power users</a></p>
|
||||||
|
<p><a href="zshguide02.html#l22">2.5.9: aliases</a></p>
|
||||||
|
<p><a href="zshguide02.html#l23">2.5.10: Environment variables</a></p>
|
||||||
|
<p><a href="zshguide02.html#l24">2.5.11: Path</a></p>
|
||||||
|
<p><a href="zshguide02.html#l25">2.5.12: Mail</a></p>
|
||||||
|
<p><a href="zshguide02.html#l26">2.5.13: Other path-like things</a></p>
|
||||||
|
<p><a href="zshguide02.html#l27">2.5.14: Version-specific things</a></p>
|
||||||
|
<p><a href="zshguide02.html#l28">2.5.15: Everything else</a></p>
|
||||||
|
<h2 id="a-hrefzshguide03htmll29chapter-3-dealing-with-basic-shell-syntaxa"><a class="header" href="#a-hrefzshguide03htmll29chapter-3-dealing-with-basic-shell-syntaxa"><a href="zshguide03.html#l29">Chapter 3: Dealing with basic shell syntax</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide03htmll3031-external-commandsa"><a class="header" href="#a-hrefzshguide03htmll3031-external-commandsa"><a href="zshguide03.html#l30">3.1: External commands</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide03htmll3132-builtin-commandsa"><a class="header" href="#a-hrefzshguide03htmll3132-builtin-commandsa"><a href="zshguide03.html#l31">3.2: Builtin commands</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l32">3.2.1: Builtins for printing</a></p>
|
||||||
|
<p><a href="zshguide03.html#l33">3.2.2: Other builtins just for speed</a></p>
|
||||||
|
<p><a href="zshguide03.html#l34">3.2.3: Builtins which change the shell's state</a></p>
|
||||||
|
<p><a href="zshguide03.html#l35">3.2.4: cd and friends</a></p>
|
||||||
|
<p><a href="zshguide03.html#l36">3.2.5: Command control and information commands</a></p>
|
||||||
|
<p><a href="zshguide03.html#l37">3.2.6: Parameter control</a></p>
|
||||||
|
<p><a href="zshguide03.html#l38">3.2.7: History control commands</a></p>
|
||||||
|
<p><a href="zshguide03.html#l39">3.2.8: Job control and process control</a></p>
|
||||||
|
<p><a href="zshguide03.html#l40">3.2.9: Terminals, users, etc.</a></p>
|
||||||
|
<p><a href="zshguide03.html#l41">3.2.10: Syntactic oddments</a></p>
|
||||||
|
<p><a href="zshguide03.html#l42">3.2.11: More precommand modifiers: <code>exec</code>,
|
||||||
|
<code>noglob</code></a></p>
|
||||||
|
<p><a href="zshguide03.html#l43">3.2.12: Testing things</a></p>
|
||||||
|
<p><a href="zshguide03.html#l44">3.2.13: Handling options to functions and scripts</a></p>
|
||||||
|
<p><a href="zshguide03.html#l45">3.2.14: Random file control things</a></p>
|
||||||
|
<p><a href="zshguide03.html#l46">3.2.15: Don't watch this space, watch some other</a></p>
|
||||||
|
<p><a href="zshguide03.html#l47">3.2.16: And also</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll4833-functionsa"><a class="header" href="#a-hrefzshguide03htmll4833-functionsa"><a href="zshguide03.html#l48">3.3: Functions</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l49">3.3.1: Loading functions</a></p>
|
||||||
|
<p><a href="zshguide03.html#l50">3.3.2: Function parameters</a></p>
|
||||||
|
<p><a href="zshguide03.html#l51">3.3.3: Compiling functions</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll5234-aliasesa"><a class="header" href="#a-hrefzshguide03htmll5234-aliasesa"><a href="zshguide03.html#l52">3.4: Aliases</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide03htmll5335-command-summarya"><a class="header" href="#a-hrefzshguide03htmll5335-command-summarya"><a href="zshguide03.html#l53">3.5: Command summary</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide03htmll5436-expansions-and-quotesa"><a class="header" href="#a-hrefzshguide03htmll5436-expansions-and-quotesa"><a href="zshguide03.html#l54">3.6: Expansions and quotes</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l55">3.6.1: History expansion</a></p>
|
||||||
|
<p><a href="zshguide03.html#l56">3.6.2: Alias expansion</a></p>
|
||||||
|
<p><a href="zshguide03.html#l57">3.6.3: Process, parameter, command, arithmetic and brace
|
||||||
|
expansion</a></p>
|
||||||
|
<p><a href="zshguide03.html#l58">3.6.4: Filename Expansion</a></p>
|
||||||
|
<p><a href="zshguide03.html#l59">3.6.5: Filename Generation</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll6037-redirection-greater-thans-and-less-thansa"><a class="header" href="#a-hrefzshguide03htmll6037-redirection-greater-thans-and-less-thansa"><a href="zshguide03.html#l60">3.7: Redirection: greater-thans and less-thans</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l61">3.7.1: Clobber</a></p>
|
||||||
|
<p><a href="zshguide03.html#l62">3.7.2: File descriptors</a></p>
|
||||||
|
<p><a href="zshguide03.html#l63">3.7.3: Appending, here documents, here strings, read
|
||||||
|
write</a></p>
|
||||||
|
<p><a href="zshguide03.html#l64">3.7.4: Clever tricks: exec and other file
|
||||||
|
descriptors</a></p>
|
||||||
|
<p><a href="zshguide03.html#l65">3.7.5: Multios</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll6638-shell-syntax-loops-subshells-and-so-ona"><a class="header" href="#a-hrefzshguide03htmll6638-shell-syntax-loops-subshells-and-so-ona"><a href="zshguide03.html#l66">3.8: Shell syntax: loops, (sub)shells and so on</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l67">3.8.1: Logical command connectors</a></p>
|
||||||
|
<p><a href="zshguide03.html#l68">3.8.2: Structures</a></p>
|
||||||
|
<p><a href="zshguide03.html#l69">3.8.3: Subshells and current shell constructs</a></p>
|
||||||
|
<p><a href="zshguide03.html#l70">3.8.4: Subshells and current shells</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll7139-emulation-and-portabilitya"><a class="header" href="#a-hrefzshguide03htmll7139-emulation-and-portabilitya"><a href="zshguide03.html#l71">3.9: Emulation and portability</a></a></h3>
|
||||||
|
<p><a href="zshguide03.html#l72">3.9.1: Differences in detail</a></p>
|
||||||
|
<p><a href="zshguide03.html#l73">3.9.2: Making your own scripts and functions
|
||||||
|
portable</a></p>
|
||||||
|
<h3 id="a-hrefzshguide03htmll74310-running-scriptsa"><a class="header" href="#a-hrefzshguide03htmll74310-running-scriptsa"><a href="zshguide03.html#l74">3.10: Running scripts</a></a></h3>
|
||||||
|
<h2 id="a-hrefzshguide04htmll75chapter-4-the-z-shell-line-editora"><a class="header" href="#a-hrefzshguide04htmll75chapter-4-the-z-shell-line-editora"><a href="zshguide04.html#l75">Chapter 4: The Z-Shell Line Editor</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide04htmll7641-introducing-zlea"><a class="header" href="#a-hrefzshguide04htmll7641-introducing-zlea"><a href="zshguide04.html#l76">4.1: Introducing zle</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l77">4.1.1: The simple facts</a></p>
|
||||||
|
<p><a href="zshguide04.html#l78">4.1.2: Vi mode</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll7942-basic-editinga"><a class="header" href="#a-hrefzshguide04htmll7942-basic-editinga"><a href="zshguide04.html#l79">4.2: Basic editing</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l80">4.2.1: Moving</a></p>
|
||||||
|
<p><a href="zshguide04.html#l81">4.2.2: Deleting</a></p>
|
||||||
|
<p><a href="zshguide04.html#l82">4.2.3: More deletion</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll8343-fancier-editinga"><a class="header" href="#a-hrefzshguide04htmll8343-fancier-editinga"><a href="zshguide04.html#l83">4.3: Fancier editing</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l84">4.3.1: Options controlling zle</a></p>
|
||||||
|
<p><a href="zshguide04.html#l85">4.3.2: The minibuffer and extended commands</a></p>
|
||||||
|
<p><a href="zshguide04.html#l86">4.3.3: Prefix (digit) arguments</a></p>
|
||||||
|
<p><a href="zshguide04.html#l87">4.3.4: Words, regions and marks</a></p>
|
||||||
|
<p><a href="zshguide04.html#l88">4.3.5: Regions and marks</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll8944-history-and-searchinga"><a class="header" href="#a-hrefzshguide04htmll8944-history-and-searchinga"><a href="zshguide04.html#l89">4.4: History and searching</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l90">4.4.1: Moving through the history</a></p>
|
||||||
|
<p><a href="zshguide04.html#l91">4.4.2: Searching through the history</a></p>
|
||||||
|
<p><a href="zshguide04.html#l92">4.4.3: Extracting words from the history</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll9345-binding-keys-and-handling-keymapsa"><a class="header" href="#a-hrefzshguide04htmll9345-binding-keys-and-handling-keymapsa"><a href="zshguide04.html#l93">4.5: Binding keys and handling keymaps</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l94">4.5.1: Simple key bindings</a></p>
|
||||||
|
<p><a href="zshguide04.html#l95">4.5.2: Removing key bindings</a></p>
|
||||||
|
<p><a href="zshguide04.html#l96">4.5.3: Function keys and so on</a></p>
|
||||||
|
<p><a href="zshguide04.html#l97">4.5.4: Binding strings instead of commands</a></p>
|
||||||
|
<p><a href="zshguide04.html#l98">4.5.5: Keymaps</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll9946-advanced-editinga"><a class="header" href="#a-hrefzshguide04htmll9946-advanced-editinga"><a href="zshguide04.html#l99">4.6: Advanced editing</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l100">4.6.1: Multi-line editing</a></p>
|
||||||
|
<p><a href="zshguide04.html#l101">4.6.2: The builtin vared and the function zed</a></p>
|
||||||
|
<p><a href="zshguide04.html#l102">4.6.3: The buffer stack</a></p>
|
||||||
|
<h3 id="a-hrefzshguide04htmll10347-extending-zlea"><a class="header" href="#a-hrefzshguide04htmll10347-extending-zlea"><a href="zshguide04.html#l103">4.7: Extending zle</a></a></h3>
|
||||||
|
<p><a href="zshguide04.html#l104">4.7.1: Widgets</a></p>
|
||||||
|
<p><a href="zshguide04.html#l105">4.7.2: Executing other widgets</a></p>
|
||||||
|
<p><a href="zshguide04.html#l106">4.7.3: Some special builtin widgets and their
|
||||||
|
uses</a></p>
|
||||||
|
<p><a href="zshguide04.html#l107">4.7.4: Special parameters: normal text</a></p>
|
||||||
|
<p><a href="zshguide04.html#l108">4.7.5: Other special parameters</a></p>
|
||||||
|
<p><a href="zshguide04.html#l109">4.7.6: Reading keys and using the minibuffer</a></p>
|
||||||
|
<p><a href="zshguide04.html#l110">4.7.7: Examples</a></p>
|
||||||
|
<h2 id="a-hrefzshguide05htmll111chapter-5-substitutionsa"><a class="header" href="#a-hrefzshguide05htmll111chapter-5-substitutionsa"><a href="zshguide05.html#l111">Chapter 5: Substitutions</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide05htmll11251-quotinga"><a class="header" href="#a-hrefzshguide05htmll11251-quotinga"><a href="zshguide05.html#l112">5.1: Quoting</a></a></h3>
|
||||||
|
<p><a href="zshguide05.html#l113">5.1.1: Backslashes</a></p>
|
||||||
|
<p><a href="zshguide05.html#l114">5.1.2: Single quotes</a></p>
|
||||||
|
<p><a href="zshguide05.html#l115">5.1.3: POSIX quotes</a></p>
|
||||||
|
<p><a href="zshguide05.html#l116">5.1.4: Double quotes</a></p>
|
||||||
|
<p><a href="zshguide05.html#l117">5.1.5: Backquotes</a></p>
|
||||||
|
<h3 id="a-hrefzshguide05htmll11852-modifiers-and-what-they-modifya"><a class="header" href="#a-hrefzshguide05htmll11852-modifiers-and-what-they-modifya"><a href="zshguide05.html#l118">5.2: Modifiers and what they modify</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll11953-process-substitutiona"><a class="header" href="#a-hrefzshguide05htmll11953-process-substitutiona"><a href="zshguide05.html#l119">5.3: Process Substitution</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll12054-parameter-substitutiona"><a class="header" href="#a-hrefzshguide05htmll12054-parameter-substitutiona"><a href="zshguide05.html#l120">5.4: Parameter substitution</a></a></h3>
|
||||||
|
<p><a href="zshguide05.html#l121">5.4.1: Using arrays</a></p>
|
||||||
|
<p><a href="zshguide05.html#l122">5.4.2: Using associative arrays</a></p>
|
||||||
|
<p><a href="zshguide05.html#l123">5.4.3: Substituted substitutions, top- and tailing,
|
||||||
|
etc.</a></p>
|
||||||
|
<p><a href="zshguide05.html#l124">5.4.4: Flags for options: splitting and joining</a></p>
|
||||||
|
<p><a href="zshguide05.html#l125">5.4.5: Flags for options: <code>GLOB_SUBST</code> and
|
||||||
|
<code>RC_EXPAND_PARAM</code></a></p>
|
||||||
|
<p><a href="zshguide05.html#l126">5.4.6: Yet more parameter flags</a></p>
|
||||||
|
<p><a href="zshguide05.html#l127">5.4.7: A couple of parameter substitution tricks</a></p>
|
||||||
|
<p><a href="zshguide05.html#l128">5.4.8: Nested parameter substitutions</a></p>
|
||||||
|
<h3 id="a-hrefzshguide05htmll12955-that-substitution-againa"><a class="header" href="#a-hrefzshguide05htmll12955-that-substitution-againa"><a href="zshguide05.html#l129">5.5: That substitution again</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll13056-arithmetic-expansiona"><a class="header" href="#a-hrefzshguide05htmll13056-arithmetic-expansiona"><a href="zshguide05.html#l130">5.6: Arithmetic Expansion</a></a></h3>
|
||||||
|
<p><a href="zshguide05.html#l131">5.6.1: Entering and outputting bases</a></p>
|
||||||
|
<p><a href="zshguide05.html#l132">5.6.2: Parameter typing</a></p>
|
||||||
|
<h3 id="a-hrefzshguide05htmll13357-brace-expansion-and-arraysa"><a class="header" href="#a-hrefzshguide05htmll13357-brace-expansion-and-arraysa"><a href="zshguide05.html#l133">5.7: Brace Expansion and Arrays</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll13458-filename-expansiona"><a class="header" href="#a-hrefzshguide05htmll13458-filename-expansiona"><a href="zshguide05.html#l134">5.8: Filename Expansion</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide05htmll13559-filename-generation-and-pattern-matchinga"><a class="header" href="#a-hrefzshguide05htmll13559-filename-generation-and-pattern-matchinga"><a href="zshguide05.html#l135">5.9: Filename Generation and Pattern Matching</a></a></h3>
|
||||||
|
<p><a href="zshguide05.html#l136">5.9.1: Comparing patterns and regular
|
||||||
|
expressions</a></p>
|
||||||
|
<p><a href="zshguide05.html#l137">5.9.2: Standard features</a></p>
|
||||||
|
<p><a href="zshguide05.html#l138">5.9.3: Extensions usually available</a></p>
|
||||||
|
<p><a href="zshguide05.html#l139">5.9.4: Extensions requiring <code>EXTENDED_GLOB</code></a></p>
|
||||||
|
<p><a href="zshguide05.html#l140">5.9.5: Recursive globbing</a></p>
|
||||||
|
<p><a href="zshguide05.html#l141">5.9.6: Glob qualifiers</a></p>
|
||||||
|
<p><a href="zshguide05.html#l142">5.9.7: Globbing flags: alter the behaviour of
|
||||||
|
matches</a></p>
|
||||||
|
<p><a href="zshguide05.html#l143">5.9.8: The function <code>zmv</code></a></p>
|
||||||
|
<h2 id="a-hrefzshguide06htmll144chapter-6-completion-old-and-newa"><a class="header" href="#a-hrefzshguide06htmll144chapter-6-completion-old-and-newa"><a href="zshguide06.html#l144">Chapter 6: Completion, old and new</a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide06htmll14561-completion-and-expansiona"><a class="header" href="#a-hrefzshguide06htmll14561-completion-and-expansiona"><a href="zshguide06.html#l145">6.1: Completion and expansion</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide06htmll14662-configuring-completion-using-shell-optionsa"><a class="header" href="#a-hrefzshguide06htmll14662-configuring-completion-using-shell-optionsa"><a href="zshguide06.html#l146">6.2: Configuring completion using shell options</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l147">6.2.1: Ambiguous completions</a></p>
|
||||||
|
<p><a href="zshguide06.html#l148">6.2.2: <code>ALWAYS_LAST_PROMPT</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l149">6.2.3: Menu completion and menu selection</a></p>
|
||||||
|
<p><a href="zshguide06.html#l150">6.2.4: Other ways of changing completion
|
||||||
|
behaviour</a></p>
|
||||||
|
<p><a href="zshguide06.html#l151">6.2.5: Changing the way completions are
|
||||||
|
displayed</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll15263-getting-started-with-new-completiona"><a class="header" href="#a-hrefzshguide06htmll15263-getting-started-with-new-completiona"><a href="zshguide06.html#l152">6.3: Getting started with new completion</a></a></h3>
|
||||||
|
<h3 id="a-hrefzshguide06htmll15364-how-the-shell-finds-the-right-completionsa"><a class="header" href="#a-hrefzshguide06htmll15364-how-the-shell-finds-the-right-completionsa"><a href="zshguide06.html#l153">6.4: How the shell finds the right completions</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l154">6.4.1: Contexts</a></p>
|
||||||
|
<p><a href="zshguide06.html#l155">6.4.2: Tags</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll15665-configuring-completion-using-stylesa"><a class="header" href="#a-hrefzshguide06htmll15665-configuring-completion-using-stylesa"><a href="zshguide06.html#l156">6.5: Configuring completion using styles</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l157">6.5.1: Specifying completers and their options</a></p>
|
||||||
|
<p><a href="zshguide06.html#l158">6.5.2: Changing the format of listings: groups
|
||||||
|
etc.</a></p>
|
||||||
|
<p><a href="zshguide06.html#l159">6.5.3: Styles affecting particular completions</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll16066-command-widgetsa"><a class="header" href="#a-hrefzshguide06htmll16066-command-widgetsa"><a href="zshguide06.html#l160">6.6: Command widgets</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l161">6.6.1: <code>_complete_help</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l162">6.6.2: <code>_correct_word</code>, <code>_correct_filename</code>,
|
||||||
|
<code>_expand_word</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l163">6.6.3: <code>_history_complete_word</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l164">6.6.4: <code>_most_recent_file</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l165">6.6.5: <code>_next_tags</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l166">6.6.6: <code>_bash_completions</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l167">6.6.7: <code>_read_comp</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l168">6.6.8: <code>_generic</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l169">6.6.9: <code>predict-on</code>, <code>incremental-complete-word</code></a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll17067-matching-control-and-controlling-where-things-are-inserteda"><a class="header" href="#a-hrefzshguide06htmll17067-matching-control-and-controlling-where-things-are-inserteda"><a href="zshguide06.html#l170">6.7: Matching control and controlling where things are inserted</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l171">6.7.1: Case-insensitive matching</a></p>
|
||||||
|
<p><a href="zshguide06.html#l172">6.7.2: Matching option names</a></p>
|
||||||
|
<p><a href="zshguide06.html#l173">6.7.3: Partial word completion</a></p>
|
||||||
|
<p><a href="zshguide06.html#l174">6.7.4: Substring completion</a></p>
|
||||||
|
<p><a href="zshguide06.html#l175">6.7.5: Partial words with capitals</a></p>
|
||||||
|
<p><a href="zshguide06.html#l176">6.7.6: Final notes</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll17768-tutoriala"><a class="header" href="#a-hrefzshguide06htmll17768-tutoriala"><a href="zshguide06.html#l177">6.8: Tutorial</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l178">6.8.1: The dispatcher</a></p>
|
||||||
|
<p><a href="zshguide06.html#l179">6.8.2: Subcommand completion: <code>_arguments</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l180">6.8.3: Completing particular argument types</a></p>
|
||||||
|
<p><a href="zshguide06.html#l181">6.8.4: The rest</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll18269-writing-new-completion-functions-and-widgetsa"><a class="header" href="#a-hrefzshguide06htmll18269-writing-new-completion-functions-and-widgetsa"><a href="zshguide06.html#l182">6.9: Writing new completion functions and widgets</a></a></h3>
|
||||||
|
<p><a href="zshguide06.html#l183">6.9.1: Loading completion functions: <code>compdef</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l184">6.9.2: Adding a set of completions: <code>compadd</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l185">6.9.3: Functions for generating filenames, etc.</a></p>
|
||||||
|
<p><a href="zshguide06.html#l186">6.9.4: The <code>zsh/parameter</code> module</a></p>
|
||||||
|
<p><a href="zshguide06.html#l187">6.9.5: Special completion parameters and
|
||||||
|
<code>compset</code></a></p>
|
||||||
|
<p><a href="zshguide06.html#l188">6.9.6: Fancier completion: using the tags and styles
|
||||||
|
mechanism</a></p>
|
||||||
|
<p><a href="zshguide06.html#l189">6.9.7: Getting the work done for you: handling arguments
|
||||||
|
etc.</a></p>
|
||||||
|
<p><a href="zshguide06.html#l190">6.9.8: More completion utility functions</a></p>
|
||||||
|
<h3 id="a-hrefzshguide06htmll191610-finallya"><a class="header" href="#a-hrefzshguide06htmll191610-finallya"><a href="zshguide06.html#l191">6.10: Finally</a></a></h3>
|
||||||
|
<h2 id="a-hrefzshguide07htmll192chapter-7-modules-and-other-bits-and-pieces-not-writtena"><a class="header" href="#a-hrefzshguide07htmll192chapter-7-modules-and-other-bits-and-pieces-not-writtena"><a href="zshguide07.html#l192">Chapter 7: Modules and other bits and pieces <em>Not written</em></a></a></h2>
|
||||||
|
<h3 id="a-hrefzshguide07htmll19371-control-over-modules-zmodloada"><a class="header" href="#a-hrefzshguide07htmll19371-control-over-modules-zmodloada"><a href="zshguide07.html#l193">7.1: Control over modules: <code>zmodload</code></a></a></h3>
|
||||||
|
<p><a href="zshguide07.html#l194">7.1.1: Modules defining parameters</a></p>
|
||||||
|
<p><a href="zshguide07.html#l195">7.1.2: Low-level system interaction</a></p>
|
||||||
|
<p><a href="zshguide07.html#l196">7.1.3: ZFTP</a></p>
|
||||||
|
<h3 id="a-hrefzshguide07htmll19772-contributed-bitsa"><a class="header" href="#a-hrefzshguide07htmll19772-contributed-bitsa"><a href="zshguide07.html#l197">7.2: Contributed bits</a></a></h3>
|
||||||
|
<p><a href="zshguide07.html#l198">7.2.1: Prompt themes</a></p>
|
||||||
|
<h3 id="a-hrefzshguide07htmll19973-whats-new-in-41a"><a class="header" href="#a-hrefzshguide07htmll19973-whats-new-in-41a"><a href="zshguide07.html#l199">7.3: What's new in 4.1</a></a></h3>
|
||||||
|
<h2 id="a-hrefzshguide08htmll200appendix-1-obtaining-zsh-and-getting-more-information-not-writtena"><a class="header" href="#a-hrefzshguide08htmll200appendix-1-obtaining-zsh-and-getting-more-information-not-writtena"><a href="zshguide08.html#l200">Appendix 1: Obtaining zsh and getting more information <em>Not written</em></a></a></h2>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||||
|
<!-- Mobile navigation buttons -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a rel="next" href="zshguide01.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a rel="next" href="zshguide01.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Livereload script (if served using the cli tool) -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var socket = new WebSocket("ws://localhost:3000/__livereload");
|
||||||
|
socket.onmessage = function (event) {
|
||||||
|
if (event.data === "reload") {
|
||||||
|
socket.close();
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.onbeforeunload = function() {
|
||||||
|
socket.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.playground_copyable = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="book.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
<!-- Custom JS scripts -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
498
zsh_guide/book/zshguide01.html
Normal file
@ -0,0 +1,498 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en" class="sidebar-visible no-js light">
|
||||||
|
<head>
|
||||||
|
<!-- Book generated using mdBook -->
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>A short introduction - Zsh User's Guide</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Custom HTML head -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.svg">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="favicon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/variables.css">
|
||||||
|
<link rel="stylesheet" href="css/general.css">
|
||||||
|
<link rel="stylesheet" href="css/chrome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/print.css" media="print">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="fonts/fonts.css">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Highlight.js Stylesheets -->
|
||||||
|
<link rel="stylesheet" href="highlight.css">
|
||||||
|
<link rel="stylesheet" href="tomorrow-night.css">
|
||||||
|
<link rel="stylesheet" href="ayu-highlight.css">
|
||||||
|
|
||||||
|
<!-- Custom theme stylesheets -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Provide site root to javascript -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var path_to_root = "";
|
||||||
|
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
try {
|
||||||
|
var theme = localStorage.getItem('mdbook-theme');
|
||||||
|
var sidebar = localStorage.getItem('mdbook-sidebar');
|
||||||
|
|
||||||
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var theme;
|
||||||
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
||||||
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
html.classList.remove('no-js')
|
||||||
|
html.classList.remove('light')
|
||||||
|
html.classList.add(theme);
|
||||||
|
html.classList.add('js');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Hide / unhide sidebar before it is displayed -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
var sidebar = 'hidden';
|
||||||
|
if (document.body.clientWidth >= 1080) {
|
||||||
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
||||||
|
sidebar = sidebar || 'visible';
|
||||||
|
}
|
||||||
|
html.classList.remove('sidebar-visible');
|
||||||
|
html.classList.add("sidebar-" + sidebar);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
||||||
|
<div class="sidebar-scrollbox">
|
||||||
|
<ol class="chapter"><li class="chapter-item expanded affix "><a href="zshguide.html">A User's Guide to the Z-Shell</a></li><li class="chapter-item expanded "><a href="zshguide01.html" class="active"><strong aria-hidden="true">1.</strong> A short introduction</a></li><li class="chapter-item expanded "><a href="zshguide02.html"><strong aria-hidden="true">2.</strong> What to put in your startup files</a></li><li class="chapter-item expanded "><a href="zshguide03.html"><strong aria-hidden="true">3.</strong> Dealing with basic shell syntax</a></li><li class="chapter-item expanded "><a href="zshguide04.html"><strong aria-hidden="true">4.</strong> The Z-Shell Line Editor</a></li><li class="chapter-item expanded "><a href="zshguide05.html"><strong aria-hidden="true">5.</strong> Substitutions</a></li><li class="chapter-item expanded "><a href="zshguide06.html"><strong aria-hidden="true">6.</strong> Completion, old and new</a></li><li class="chapter-item expanded "><a href="zshguide07.html"><strong aria-hidden="true">7.</strong> Modules and other bits and pieces Not written</a></li></ol>
|
||||||
|
</div>
|
||||||
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div id="page-wrapper" class="page-wrapper">
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
|
||||||
|
<div id="menu-bar-hover-placeholder"></div>
|
||||||
|
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||||
|
<div class="left-buttons">
|
||||||
|
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||||
|
<i class="fa fa-bars"></i>
|
||||||
|
</button>
|
||||||
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
||||||
|
<i class="fa fa-paint-brush"></i>
|
||||||
|
</button>
|
||||||
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="menu-title">Zsh User's Guide</h1>
|
||||||
|
|
||||||
|
<div class="right-buttons">
|
||||||
|
|
||||||
|
<a href="print.html" title="Print this book" aria-label="Print this book">
|
||||||
|
<i id="print-button" class="fa fa-print"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="search-wrapper" class="hidden">
|
||||||
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
|
</form>
|
||||||
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
|
<div id="searchresults-header" class="searchresults-header"></div>
|
||||||
|
<ul id="searchresults">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
||||||
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
||||||
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
||||||
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="content" class="content">
|
||||||
|
<main>
|
||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
|
<p><strong>Table of Contents</strong> <em>generated with <a href="https://github.com/thlorenz/doctoc">DocToc</a></em></p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#chapter-1-a-short-introduction">Chapter 1: A short introduction</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#11-other-shells-and-other-guides">1.1: Other shells and other guides</a></li>
|
||||||
|
<li><a href="#12-versions-of-zsh">1.2: Versions of zsh</a></li>
|
||||||
|
<li><a href="#13-conventions">1.3: Conventions</a></li>
|
||||||
|
<li><a href="#14-acknowledgments">1.4: Acknowledgments</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<p><span id="intro"></span><span id="l1"></span></p>
|
||||||
|
<h1 id="chapter-1-a-short-introduction"><a class="header" href="#chapter-1-a-short-introduction">Chapter 1: A short introduction</a></h1>
|
||||||
|
<p>The Z-Shell, `zsh' for short, is a command interpreter for UNIX
|
||||||
|
systems, or in UNIX jargon, a `shell', because it wraps around the
|
||||||
|
commands you use. More than that, however, zsh is a particularly
|
||||||
|
powerful shell --- and it's free, and under regular maintenance --- with
|
||||||
|
lots of interactive features allowing you to do the maximum work with
|
||||||
|
the minimum fuss. Of course, for that you need to know what the shell
|
||||||
|
can do and how, and that's what this guide is for.</p>
|
||||||
|
<p>The most basic basics: I shall assume you have access to a UNIX system,
|
||||||
|
otherwise the rest of this is not going to be much use. You can also use
|
||||||
|
zsh under Windows by installing Cygwin, which provides a UNIX-like
|
||||||
|
environment for programmes --- given the weakness of the standard
|
||||||
|
Windows command interpreter, this is a good thing to do. There are ports
|
||||||
|
of older versions of zsh to Windows which run natively, i.e. without a
|
||||||
|
UNIX environment, although these have a slightly different behaviour in
|
||||||
|
some respects and I won't talk about them further.</p>
|
||||||
|
<p>I'll also assume some basic knowledge of UNIX; you should know how the
|
||||||
|
filesystem works, i.e. what <code>/home/users/pws/.zshrc</code> and <code>../file</code> mean,
|
||||||
|
and some basic commands, for example <code>ls</code>, and you should have
|
||||||
|
experience with using <code>rm</code> to delete completely the wrong file by
|
||||||
|
accident, and that sort of thing. In something like `<code>rm file</code>', I will
|
||||||
|
often refer to the `command' (<code>rm</code>, of course) and the `argument(s)'
|
||||||
|
(anything else coming after the command which is used by it), and to the
|
||||||
|
complete thing you typed in one go as the `command line'.</p>
|
||||||
|
<p>You're also going to need zsh itself; if you're reading this, you may
|
||||||
|
well already have it, but if you don't, you or your system administrator
|
||||||
|
should read <a href="zshguide08.html#appa">Appendix A</a>. For now, we'll suppose
|
||||||
|
you're sitting in front of a terminal with zsh already running.</p>
|
||||||
|
<p>Now to the shell. After you log in, you probably see some prompt (a
|
||||||
|
series of symbols on the screen indicating that you can input a
|
||||||
|
command), such as `<code>$</code>' or `<code>%</code>', possibly with some other text in
|
||||||
|
front --- later, we'll see how you can change that text in interesting
|
||||||
|
ways. That prompt comes from the shell. Type `<code>print hello</code>', then
|
||||||
|
backspace over `<code>hello</code>' and type `<code>goodbye</code>'. Now hit the `Return'
|
||||||
|
key (or `Enter' key, I'll just say <code><RET></code> from now on, likewise
|
||||||
|
<code><TAB></code> for the tab key, <code><SPC></code> for the space key); unless you have a
|
||||||
|
serious practical-joker problem on your system, you will see
|
||||||
|
`<code>goodbye</code>', and the shell will come back with another prompt. All of
|
||||||
|
the time up to when you hit <code><RET></code>, you were interacting with the shell
|
||||||
|
and its editor, called `Z-Shell Line Editor' or `zle' for short; only
|
||||||
|
then did the shell go away and tell the <code>print</code> command to print out a
|
||||||
|
message. So you can see that the shell is important.</p>
|
||||||
|
<p>However, if all you're doing is typing simple commands like that, why do
|
||||||
|
you need anything complicated? In that case, you don't; but real life's
|
||||||
|
not that simple. In the rest of this guide, I describe how, with zsh's
|
||||||
|
help, you can:</p>
|
||||||
|
<ul>
|
||||||
|
<li>customise the environment in which you work, by using startup files,</li>
|
||||||
|
<li>write your own commands to shorten tasks and store things in shell
|
||||||
|
variables (`parameters') so you don't have to remember them,</li>
|
||||||
|
<li>use zle to minimise the amount of typing you have to do --- in zsh,
|
||||||
|
you can even edit small files that way,</li>
|
||||||
|
<li>pick the files you want to use for a particular command such as <code>mv</code>
|
||||||
|
or <code>ls</code> using zsh's very sophisticated filename generation (known
|
||||||
|
colloquially as `globbing') system,</li>
|
||||||
|
<li>tell the editor what sort of arguments you use with particular
|
||||||
|
commands, so that you only need to type part of the name and it will
|
||||||
|
complete the rest, using zsh's unrivalled programmable completion
|
||||||
|
system,</li>
|
||||||
|
<li>use the extra add-ons (`modules') supplied with the latest version
|
||||||
|
of zsh to do other things you usually can't do in a shell at all.</li>
|
||||||
|
</ul>
|
||||||
|
<p>That's only a tiny sample. Since there's so much to say, this guide will
|
||||||
|
concentrate on the things zsh does best, and in particular the things it
|
||||||
|
has which other shells don't. The next chapter gives a few of the
|
||||||
|
basics, by trying to explain how to set the shell up the way you want
|
||||||
|
it. Like the rest of the guide, it's not intended to be exhaustive, for
|
||||||
|
which you should look at the shell manual.</p>
|
||||||
|
<p>Some other things you should probably know straight away. First, the
|
||||||
|
shell is always running, even when the command you typed is running,
|
||||||
|
too; the shell simply hangs around waiting for it to finish: you may
|
||||||
|
know from other shells about putting commands in the <strong>background</strong> by
|
||||||
|
putting an `<code>&</code>' after the command, which means that the shell doesn't
|
||||||
|
wait for them to finish. The shell is there even if the command's in the
|
||||||
|
foreground, but in this case doing nothing.</p>
|
||||||
|
<p>Second, it doesn't just run other people's commands, it has some of its
|
||||||
|
own, called <strong>builtin commands</strong> or just <strong>builtins</strong>, and you can even
|
||||||
|
add your own commands as lists of instructions to the shell called
|
||||||
|
<strong>functions</strong>; builtins and functions always run in the shell itself.
|
||||||
|
That's important to know, because things which don't run in the shell
|
||||||
|
itself can't affect it, and hence can't alter parameters, functions,
|
||||||
|
aliases, and all the other things I shall talk about.</p>
|
||||||
|
<p><span id="l2"></span></p>
|
||||||
|
<h2 id="11-other-shells-and-other-guides"><a class="header" href="#11-other-shells-and-other-guides">1.1: Other shells and other guides</a></h2>
|
||||||
|
<p>If you want a basic grounding in how shells work, what their syntax is
|
||||||
|
(i.e. how to write commands), and how to write scripts and functions,
|
||||||
|
you should read one of the many books on the subject. In particular, you
|
||||||
|
will get most out of a book that describes the Korn shell (ksh), as zsh
|
||||||
|
is very similar to this --- so similar that it will be worth my while
|
||||||
|
pointing out differences as we go along, since they can confuse ksh
|
||||||
|
users. Recent versions of zsh can emulate ksh (strictly, the 1988
|
||||||
|
version of ksh, although there are increasingly features from the 1993
|
||||||
|
version) quite closely, although it's not perfect, and less perfect the
|
||||||
|
more closely you look. However, it's important to realise that if you
|
||||||
|
just start up any old zsh there is no guarantee that it will be set up
|
||||||
|
to work like ksh; unless you or your system adminstrator have changed
|
||||||
|
some settings, it certainly won't be. You might not see that straight
|
||||||
|
away, but it affects the shell in subtle ways. I will talk about
|
||||||
|
emulation a bit more later on.</p>
|
||||||
|
<p>A few other shells are worth mentioning. The grandfather of all UNIX
|
||||||
|
shells is sh, now known as the Bourne shell but originally just referred
|
||||||
|
to as `the shell'. The story is similar to ksh: zsh can emulate sh
|
||||||
|
quite closely (much more closely than ksh, since sh is considerably
|
||||||
|
simpler), but in general you need to make sure it's set up to do that
|
||||||
|
before you can be sure it will emulate sh.</p>
|
||||||
|
<p>You may also come across the `Bourne-Again Shell', bash. This is a
|
||||||
|
freely-available enhancement of sh written by the GNU project --- but it
|
||||||
|
is not always enhanced along the lines of ksh, and hence in many ways it
|
||||||
|
is very different from zsh. On some free UNIX-like systems such as
|
||||||
|
Linux/GNU (which is what people usually mean by Linux), the command sh
|
||||||
|
is really bash, so there you should be extra careful when trying to
|
||||||
|
ensure that something which runs under the so-called `sh' will also run
|
||||||
|
under zsh. Some Linux systems also have another simpler Bourne shell
|
||||||
|
clone, ash; as it's simpler, it's more like the original Bourne shell.</p>
|
||||||
|
<p>Some more modern operating systems talk about `the POSIX shell'. This
|
||||||
|
is an attempt to standardize UNIX shells; it's most like the Korn shell,
|
||||||
|
although, a bit confusingly, it's often just called sh, because the
|
||||||
|
standard says that it should be. Usually, this just means you get a bit
|
||||||
|
extra free with your sh and it still does what you expect. Zsh has made
|
||||||
|
some attempts to fit the standard, but you have to tell it to --- again,
|
||||||
|
simply starting up `zsh' will not have the right settings for that.</p>
|
||||||
|
<p>There is another common family of shells with, unfortunately,
|
||||||
|
incompatible syntax. The source of this family is the C-Shell, csh, so
|
||||||
|
called because its syntax looks more like the C programming language.
|
||||||
|
This became widespread when the only other shell available was sh
|
||||||
|
because csh had better interactive features, such as job control. It was
|
||||||
|
then enhanced to make tcsh, which has many of the interactive features
|
||||||
|
you will also find in zsh, and so became very popular. Despite these
|
||||||
|
common features, the syntax of zsh is very different, so you should not
|
||||||
|
try and use csh/tcsh commands beyond the very simplest in zsh; but if
|
||||||
|
you are a tcsh user, you will find virtually every capability you are
|
||||||
|
used to in zsh somewhere, plus a lot more.</p>
|
||||||
|
<p><span id="l3"></span></p>
|
||||||
|
<h2 id="12-versions-of-zsh"><a class="header" href="#12-versions-of-zsh">1.2: Versions of zsh</a></h2>
|
||||||
|
<p>At the time of writing, the most recent version of zsh available for
|
||||||
|
widespread use was 4.0.6. You will commonly find two sets of older zsh's
|
||||||
|
around. The 3.0 series, of which the last release was 3.0.9, was a
|
||||||
|
stable release, with only bug fixes since the first release of zsh 3.
|
||||||
|
The 3.1 series were beta versions, with lots of new features; the last
|
||||||
|
of these, 3.1.9, was not so different from 4.0.1; the main change is
|
||||||
|
that the shell has now been declared stable, so that as with zsh 3 there
|
||||||
|
will be a set of bug fixes, labelled 4.0, and a set with new functions
|
||||||
|
in, labelled 4.1. As 4.0 replaces all zsh 3 versions, I will try to keep
|
||||||
|
things simple and talk about that; but every now and then it will be
|
||||||
|
helpful to point out where older versions were different.</p>
|
||||||
|
<p>One notable feature of zsh is the completion of command line arguments.
|
||||||
|
The system changed in 3.1.6 and 3.1.7 to make it a lot more
|
||||||
|
configurable, and (provided you keep your wits about you) a little less
|
||||||
|
obscure. I therefore won't describe the old completion system, which
|
||||||
|
used the `compctl' command, in any detail; a very brief introduction is
|
||||||
|
given in the zsh FAQ. The old system remains available, however we
|
||||||
|
strongly recommend new users to start with the new one. See <a href="zshguide06.html#comp">chapter
|
||||||
|
6</a> `Completion, old and new' for the lowdown on
|
||||||
|
new-style completion.</p>
|
||||||
|
<p>There won't be a big difference between 4.0 and 4.1, just bug fixes and
|
||||||
|
a few evolutionary changes, plus some extra modules. There will be some
|
||||||
|
notes in <a href="zshguide07.html#ragbag">chapter 7</a> about new features in 4.1,
|
||||||
|
but nothing you write for 4.0 is likely to become obsolete in the
|
||||||
|
foreseeable future.</p>
|
||||||
|
<p><span id="l4"></span></p>
|
||||||
|
<h2 id="13-conventions"><a class="header" href="#13-conventions">1.3: Conventions</a></h2>
|
||||||
|
<p>Most of what I say will be reasonably self-contained (which means I use
|
||||||
|
phrases like `as I said before' and `as I'll discuss later on' more
|
||||||
|
than a real stylist would like, and the number times I refer to other
|
||||||
|
chapters is excessive), but there are some points I should perhaps draw
|
||||||
|
your attention to before you leap in.</p>
|
||||||
|
<p>I will often write chunks of code as you would put them in a file for
|
||||||
|
execution (a `script' or a `function', the differences to be discussed
|
||||||
|
<em>passim</em>):</p>
|
||||||
|
<pre><code> if [[ $ZSH_VERSION = 3.* ]]; then
|
||||||
|
print This is a release of the third version of zsh.
|
||||||
|
else
|
||||||
|
print This is either very new or very old.
|
||||||
|
fi
|
||||||
|
</code></pre>
|
||||||
|
<p>but sometimes I will show both what you type into a shell interactively,
|
||||||
|
and what the shell throws back at you:</p>
|
||||||
|
<pre><code> % print $ZSH_VERSION
|
||||||
|
3.1.9
|
||||||
|
% print $CPUTYPE
|
||||||
|
i586
|
||||||
|
</code></pre>
|
||||||
|
<p>Here, `<code>%</code>' shows the prompt the shell puts up to tell you it is
|
||||||
|
expecting input (and the space immediately after is part of it).
|
||||||
|
Actually, you probably see something before the percent sign like the
|
||||||
|
name of the machine or your user name, or maybe something fancier. I've
|
||||||
|
pruned it to the minimum to avoid confusion, and kept it as reminder
|
||||||
|
that this is the line you type.</p>
|
||||||
|
<p>If you're reading an electronic version of this guide, and want to copy
|
||||||
|
lines with the `<code>%</code>' in front into a terminal to be executed, there's a
|
||||||
|
neat way of doing this where you don't even have to edit the line first:</p>
|
||||||
|
<pre><code> alias %=' '
|
||||||
|
</code></pre>
|
||||||
|
<p>Then <code>%</code> at the start of a line is turned into nothing whatsoever; the
|
||||||
|
space just indicates that any following aliases should be expanded. So
|
||||||
|
the line `<code>% print $CPUTYPE</code>' will ignore the `<code>%</code>' and execute the
|
||||||
|
rest of the line. (I hope it's obvious, but your <em>own</em> prompt is always
|
||||||
|
ignored; this is just if you copy the prompts from the guide into the
|
||||||
|
shell.)</p>
|
||||||
|
<p>There are lots of different types of object in zsh, but one of the most
|
||||||
|
common is parameters, which I will always show with a `<code>$</code>' sign in
|
||||||
|
front, like `<code>$ZSH_VERSION</code>', to remind you they are parameters. You
|
||||||
|
need to remember that when you're setting or fiddling with the parameter
|
||||||
|
itself, rather than its value, you omit the `<code>$</code>'. When you do and
|
||||||
|
don't need it should become clearer as we go along.</p>
|
||||||
|
<p>The other objects I'll show specially are shell options --- choices
|
||||||
|
about how the shell is to work --- which I write like this:
|
||||||
|
`<code>SH_WORD_SPLIT</code>', `<code>NO_NOMATCH</code>', `<code>ZLE</code>'. Again, that's not the
|
||||||
|
whole story since whenever the shell expects options you can write them
|
||||||
|
in upper or lower case with as many or as few underscores as you like;
|
||||||
|
and often in code chunks I'll use the simplest form instead:
|
||||||
|
`<code>shwordsplit</code>', `<code>nonomatch</code>', `<code>zle</code>'. If you're philosophical you
|
||||||
|
can think of it as expressing the category difference between talking
|
||||||
|
about programming and actual programming, but really it's just me being
|
||||||
|
inconsistent.</p>
|
||||||
|
<p>You may find it odd that I use three hyphens to signify a dash. That's
|
||||||
|
actually a convention used in the printed version of this guide, which
|
||||||
|
is made with LaTeX. One day, I will turn this into a macro and it will
|
||||||
|
appear properly in other versions; but then, one day the universe will
|
||||||
|
come to an end.</p>
|
||||||
|
<p><span id="l5"></span></p>
|
||||||
|
<h2 id="14-acknowledgments"><a class="header" href="#14-acknowledgments">1.4: Acknowledgments</a></h2>
|
||||||
|
<p>I am grateful for comments from various zsh users. In particular, I have
|
||||||
|
had detailed comments and corrections from Bart Schaefer, Sven `Mr
|
||||||
|
Completion' Wischnowsky and Oliver Kiddle. It's usual to add that any
|
||||||
|
remaining errors are my own, but that's so stark staringly obvious as to
|
||||||
|
be ridiculous. I mean, who wrote this? Never mind.</p>
|
||||||
|
<p>Most of this written on one or another release of Linux Mandrake (a
|
||||||
|
derivative of Red Hat), with the usual GNU and XFree86 tools. Since all
|
||||||
|
of this was free, it only seems fair to say `thank you' for the gift.
|
||||||
|
It also works a lot better than the operating system that came with this
|
||||||
|
particular PC.</p>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||||
|
<!-- Mobile navigation buttons -->
|
||||||
|
|
||||||
|
<a rel="prev" href="zshguide.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
||||||
|
<i class="fa fa-angle-left"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a rel="next" href="zshguide02.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
||||||
|
|
||||||
|
<a rel="prev" href="zshguide.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
||||||
|
<i class="fa fa-angle-left"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a rel="next" href="zshguide02.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Livereload script (if served using the cli tool) -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var socket = new WebSocket("ws://localhost:3000/__livereload");
|
||||||
|
socket.onmessage = function (event) {
|
||||||
|
if (event.data === "reload") {
|
||||||
|
socket.close();
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.onbeforeunload = function() {
|
||||||
|
socket.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.playground_copyable = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="book.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
<!-- Custom JS scripts -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
2077
zsh_guide/book/zshguide02.html
Normal file
5503
zsh_guide/book/zshguide03.html
Normal file
2083
zsh_guide/book/zshguide04.html
Normal file
3569
zsh_guide/book/zshguide05.html
Normal file
5008
zsh_guide/book/zshguide06.html
Normal file
282
zsh_guide/book/zshguide07.html
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en" class="sidebar-visible no-js light">
|
||||||
|
<head>
|
||||||
|
<!-- Book generated using mdBook -->
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Modules and other bits and pieces Not written - Zsh User's Guide</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Custom HTML head -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.svg">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="favicon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/variables.css">
|
||||||
|
<link rel="stylesheet" href="css/general.css">
|
||||||
|
<link rel="stylesheet" href="css/chrome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/print.css" media="print">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="fonts/fonts.css">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Highlight.js Stylesheets -->
|
||||||
|
<link rel="stylesheet" href="highlight.css">
|
||||||
|
<link rel="stylesheet" href="tomorrow-night.css">
|
||||||
|
<link rel="stylesheet" href="ayu-highlight.css">
|
||||||
|
|
||||||
|
<!-- Custom theme stylesheets -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Provide site root to javascript -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var path_to_root = "";
|
||||||
|
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
try {
|
||||||
|
var theme = localStorage.getItem('mdbook-theme');
|
||||||
|
var sidebar = localStorage.getItem('mdbook-sidebar');
|
||||||
|
|
||||||
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
||||||
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var theme;
|
||||||
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
||||||
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
html.classList.remove('no-js')
|
||||||
|
html.classList.remove('light')
|
||||||
|
html.classList.add(theme);
|
||||||
|
html.classList.add('js');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Hide / unhide sidebar before it is displayed -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var html = document.querySelector('html');
|
||||||
|
var sidebar = 'hidden';
|
||||||
|
if (document.body.clientWidth >= 1080) {
|
||||||
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
||||||
|
sidebar = sidebar || 'visible';
|
||||||
|
}
|
||||||
|
html.classList.remove('sidebar-visible');
|
||||||
|
html.classList.add("sidebar-" + sidebar);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
||||||
|
<div class="sidebar-scrollbox">
|
||||||
|
<ol class="chapter"><li class="chapter-item expanded affix "><a href="zshguide.html">A User's Guide to the Z-Shell</a></li><li class="chapter-item expanded "><a href="zshguide01.html"><strong aria-hidden="true">1.</strong> A short introduction</a></li><li class="chapter-item expanded "><a href="zshguide02.html"><strong aria-hidden="true">2.</strong> What to put in your startup files</a></li><li class="chapter-item expanded "><a href="zshguide03.html"><strong aria-hidden="true">3.</strong> Dealing with basic shell syntax</a></li><li class="chapter-item expanded "><a href="zshguide04.html"><strong aria-hidden="true">4.</strong> The Z-Shell Line Editor</a></li><li class="chapter-item expanded "><a href="zshguide05.html"><strong aria-hidden="true">5.</strong> Substitutions</a></li><li class="chapter-item expanded "><a href="zshguide06.html"><strong aria-hidden="true">6.</strong> Completion, old and new</a></li><li class="chapter-item expanded "><a href="zshguide07.html" class="active"><strong aria-hidden="true">7.</strong> Modules and other bits and pieces Not written</a></li></ol>
|
||||||
|
</div>
|
||||||
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div id="page-wrapper" class="page-wrapper">
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
|
||||||
|
<div id="menu-bar-hover-placeholder"></div>
|
||||||
|
<div id="menu-bar" class="menu-bar sticky bordered">
|
||||||
|
<div class="left-buttons">
|
||||||
|
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||||
|
<i class="fa fa-bars"></i>
|
||||||
|
</button>
|
||||||
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
||||||
|
<i class="fa fa-paint-brush"></i>
|
||||||
|
</button>
|
||||||
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="menu-title">Zsh User's Guide</h1>
|
||||||
|
|
||||||
|
<div class="right-buttons">
|
||||||
|
|
||||||
|
<a href="print.html" title="Print this book" aria-label="Print this book">
|
||||||
|
<i id="print-button" class="fa fa-print"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="search-wrapper" class="hidden">
|
||||||
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
|
</form>
|
||||||
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
|
<div id="searchresults-header" class="searchresults-header"></div>
|
||||||
|
<ul id="searchresults">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
||||||
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
||||||
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
||||||
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="content" class="content">
|
||||||
|
<main>
|
||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
|
<p><strong>Table of Contents</strong> <em>generated with <a href="https://github.com/thlorenz/doctoc">DocToc</a></em></p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#chapter-7-modules-and-other-bits-and-pieces-not-written">Chapter 7: Modules and other bits and pieces <em>Not written</em></a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#71-control-over-modules-zmodload">7.1: Control over modules: <code>zmodload</code></a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#711-modules-defining-parameters">7.1.1: Modules defining parameters</a></li>
|
||||||
|
<li><a href="#712-low-level-system-interaction">7.1.2: Low-level system interaction</a></li>
|
||||||
|
<li><a href="#713-zftp">7.1.3: ZFTP</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#72-contributed-bits">7.2: Contributed bits</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#721-prompt-themes">7.2.1: Prompt themes</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#73-whats-new-in-41">7.3: What's new in 4.1</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<p><span id="ragbag"></span><span id="l192"></span></p>
|
||||||
|
<h1 id="chapter-7-modules-and-other-bits-and-pieces-not-written"><a class="header" href="#chapter-7-modules-and-other-bits-and-pieces-not-written">Chapter 7: Modules and other bits and pieces <em>Not written</em></a></h1>
|
||||||
|
<p><span id="l193"></span></p>
|
||||||
|
<h2 id="71-control-over-modules-zmodload"><a class="header" href="#71-control-over-modules-zmodload">7.1: Control over modules: <code>zmodload</code></a></h2>
|
||||||
|
<p><span id="l194"></span></p>
|
||||||
|
<h3 id="711-modules-defining-parameters"><a class="header" href="#711-modules-defining-parameters">7.1.1: Modules defining parameters</a></h3>
|
||||||
|
<p><span id="l195"></span></p>
|
||||||
|
<h3 id="712-low-level-system-interaction"><a class="header" href="#712-low-level-system-interaction">7.1.2: Low-level system interaction</a></h3>
|
||||||
|
<p><span id="l196"></span></p>
|
||||||
|
<h3 id="713-zftp"><a class="header" href="#713-zftp">7.1.3: ZFTP</a></h3>
|
||||||
|
<p><span id="l197"></span></p>
|
||||||
|
<h2 id="72-contributed-bits"><a class="header" href="#72-contributed-bits">7.2: Contributed bits</a></h2>
|
||||||
|
<p><span id="l198"></span></p>
|
||||||
|
<h3 id="721-prompt-themes"><a class="header" href="#721-prompt-themes">7.2.1: Prompt themes</a></h3>
|
||||||
|
<p><span id="l199"></span></p>
|
||||||
|
<h2 id="73-whats-new-in-41"><a class="header" href="#73-whats-new-in-41">7.3: What's new in 4.1</a></h2>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||||
|
<!-- Mobile navigation buttons -->
|
||||||
|
|
||||||
|
<a rel="prev" href="zshguide06.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
||||||
|
<i class="fa fa-angle-left"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
||||||
|
|
||||||
|
<a rel="prev" href="zshguide06.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
||||||
|
<i class="fa fa-angle-left"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Livereload script (if served using the cli tool) -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var socket = new WebSocket("ws://localhost:3000/__livereload");
|
||||||
|
socket.onmessage = function (event) {
|
||||||
|
if (event.data === "reload") {
|
||||||
|
socket.close();
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.onbeforeunload = function() {
|
||||||
|
socket.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.playground_copyable = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="book.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
<!-- Custom JS scripts -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
zsh_guide/src/SUMMARY.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Summary
|
||||||
|
|
||||||
|
[A User's Guide to the Z-Shell](./zshguide.md)
|
||||||
|
- [A short introduction](./zshguide01.md)
|
||||||
|
- [What to put in your startup files](./zshguide02.md)
|
||||||
|
- [Dealing with basic shell syntax](./zshguide03.md)
|
||||||
|
- [The Z-Shell Line Editor](./zshguide04.md)
|
||||||
|
- [Substitutions](./zshguide05.md)
|
||||||
|
- [Completion, old and new](./zshguide06.md)
|
||||||
|
- [Modules and other bits and pieces *Not written*](./zshguide07.md)
|
429
zsh_guide/src/zshguide.md
Normal file
@ -0,0 +1,429 @@
|
|||||||
|
-----
|
||||||
|
|
||||||
|
# A User's Guide to the Z-Shell
|
||||||
|
|
||||||
|
## Peter Stephenson
|
||||||
|
|
||||||
|
## 2003/03/23
|
||||||
|
|
||||||
|
# Table of Contents
|
||||||
|
|
||||||
|
## [Chapter 1: A short introduction](zshguide01.html#l1)
|
||||||
|
|
||||||
|
### [1.1: Other shells and other guides](zshguide01.html#l2)
|
||||||
|
|
||||||
|
### [1.2: Versions of zsh](zshguide01.html#l3)
|
||||||
|
|
||||||
|
### [1.3: Conventions](zshguide01.html#l4)
|
||||||
|
|
||||||
|
### [1.4: Acknowledgments](zshguide01.html#l5)
|
||||||
|
|
||||||
|
## [Chapter 2: What to put in your startup files](zshguide02.html#l6)
|
||||||
|
|
||||||
|
### [2.1: Types of shell: interactive and login shells](zshguide02.html#l7)
|
||||||
|
|
||||||
|
[2.1.1: What is a login shell? Simple tests](zshguide02.html#l8)
|
||||||
|
|
||||||
|
### [2.2: All the startup files](zshguide02.html#l9)
|
||||||
|
|
||||||
|
### [2.3: Options](zshguide02.html#l10)
|
||||||
|
|
||||||
|
### [2.4: Parameters](zshguide02.html#l11)
|
||||||
|
|
||||||
|
[2.4.1: Arrays](zshguide02.html#l12)
|
||||||
|
|
||||||
|
### [2.5: What to put in your startup files](zshguide02.html#l13)
|
||||||
|
|
||||||
|
[2.5.1: Compatibility options: `SH_WORD_SPLIT` and
|
||||||
|
others](zshguide02.html#l14)
|
||||||
|
|
||||||
|
[2.5.2: Options for csh junkies](zshguide02.html#l15)
|
||||||
|
|
||||||
|
[2.5.3: The history mechanism: types of history](zshguide02.html#l16)
|
||||||
|
|
||||||
|
[2.5.4: Setting up history](zshguide02.html#l17)
|
||||||
|
|
||||||
|
[2.5.5: History options](zshguide02.html#l18)
|
||||||
|
|
||||||
|
[2.5.6: Prompts](zshguide02.html#l19)
|
||||||
|
|
||||||
|
[2.5.7: Named directories](zshguide02.html#l20)
|
||||||
|
|
||||||
|
[2.5.8: \`Go faster' options for power users](zshguide02.html#l21)
|
||||||
|
|
||||||
|
[2.5.9: aliases](zshguide02.html#l22)
|
||||||
|
|
||||||
|
[2.5.10: Environment variables](zshguide02.html#l23)
|
||||||
|
|
||||||
|
[2.5.11: Path](zshguide02.html#l24)
|
||||||
|
|
||||||
|
[2.5.12: Mail](zshguide02.html#l25)
|
||||||
|
|
||||||
|
[2.5.13: Other path-like things](zshguide02.html#l26)
|
||||||
|
|
||||||
|
[2.5.14: Version-specific things](zshguide02.html#l27)
|
||||||
|
|
||||||
|
[2.5.15: Everything else](zshguide02.html#l28)
|
||||||
|
|
||||||
|
## [Chapter 3: Dealing with basic shell syntax](zshguide03.html#l29)
|
||||||
|
|
||||||
|
### [3.1: External commands](zshguide03.html#l30)
|
||||||
|
|
||||||
|
### [3.2: Builtin commands](zshguide03.html#l31)
|
||||||
|
|
||||||
|
[3.2.1: Builtins for printing](zshguide03.html#l32)
|
||||||
|
|
||||||
|
[3.2.2: Other builtins just for speed](zshguide03.html#l33)
|
||||||
|
|
||||||
|
[3.2.3: Builtins which change the shell's state](zshguide03.html#l34)
|
||||||
|
|
||||||
|
[3.2.4: cd and friends](zshguide03.html#l35)
|
||||||
|
|
||||||
|
[3.2.5: Command control and information commands](zshguide03.html#l36)
|
||||||
|
|
||||||
|
[3.2.6: Parameter control](zshguide03.html#l37)
|
||||||
|
|
||||||
|
[3.2.7: History control commands](zshguide03.html#l38)
|
||||||
|
|
||||||
|
[3.2.8: Job control and process control](zshguide03.html#l39)
|
||||||
|
|
||||||
|
[3.2.9: Terminals, users, etc.](zshguide03.html#l40)
|
||||||
|
|
||||||
|
[3.2.10: Syntactic oddments](zshguide03.html#l41)
|
||||||
|
|
||||||
|
[3.2.11: More precommand modifiers: `exec`,
|
||||||
|
`noglob`](zshguide03.html#l42)
|
||||||
|
|
||||||
|
[3.2.12: Testing things](zshguide03.html#l43)
|
||||||
|
|
||||||
|
[3.2.13: Handling options to functions and scripts](zshguide03.html#l44)
|
||||||
|
|
||||||
|
[3.2.14: Random file control things](zshguide03.html#l45)
|
||||||
|
|
||||||
|
[3.2.15: Don't watch this space, watch some other](zshguide03.html#l46)
|
||||||
|
|
||||||
|
[3.2.16: And also](zshguide03.html#l47)
|
||||||
|
|
||||||
|
### [3.3: Functions](zshguide03.html#l48)
|
||||||
|
|
||||||
|
[3.3.1: Loading functions](zshguide03.html#l49)
|
||||||
|
|
||||||
|
[3.3.2: Function parameters](zshguide03.html#l50)
|
||||||
|
|
||||||
|
[3.3.3: Compiling functions](zshguide03.html#l51)
|
||||||
|
|
||||||
|
### [3.4: Aliases](zshguide03.html#l52)
|
||||||
|
|
||||||
|
### [3.5: Command summary](zshguide03.html#l53)
|
||||||
|
|
||||||
|
### [3.6: Expansions and quotes](zshguide03.html#l54)
|
||||||
|
|
||||||
|
[3.6.1: History expansion](zshguide03.html#l55)
|
||||||
|
|
||||||
|
[3.6.2: Alias expansion](zshguide03.html#l56)
|
||||||
|
|
||||||
|
[3.6.3: Process, parameter, command, arithmetic and brace
|
||||||
|
expansion](zshguide03.html#l57)
|
||||||
|
|
||||||
|
[3.6.4: Filename Expansion](zshguide03.html#l58)
|
||||||
|
|
||||||
|
[3.6.5: Filename Generation](zshguide03.html#l59)
|
||||||
|
|
||||||
|
### [3.7: Redirection: greater-thans and less-thans](zshguide03.html#l60)
|
||||||
|
|
||||||
|
[3.7.1: Clobber](zshguide03.html#l61)
|
||||||
|
|
||||||
|
[3.7.2: File descriptors](zshguide03.html#l62)
|
||||||
|
|
||||||
|
[3.7.3: Appending, here documents, here strings, read
|
||||||
|
write](zshguide03.html#l63)
|
||||||
|
|
||||||
|
[3.7.4: Clever tricks: exec and other file
|
||||||
|
descriptors](zshguide03.html#l64)
|
||||||
|
|
||||||
|
[3.7.5: Multios](zshguide03.html#l65)
|
||||||
|
|
||||||
|
### [3.8: Shell syntax: loops, (sub)shells and so on](zshguide03.html#l66)
|
||||||
|
|
||||||
|
[3.8.1: Logical command connectors](zshguide03.html#l67)
|
||||||
|
|
||||||
|
[3.8.2: Structures](zshguide03.html#l68)
|
||||||
|
|
||||||
|
[3.8.3: Subshells and current shell constructs](zshguide03.html#l69)
|
||||||
|
|
||||||
|
[3.8.4: Subshells and current shells](zshguide03.html#l70)
|
||||||
|
|
||||||
|
### [3.9: Emulation and portability](zshguide03.html#l71)
|
||||||
|
|
||||||
|
[3.9.1: Differences in detail](zshguide03.html#l72)
|
||||||
|
|
||||||
|
[3.9.2: Making your own scripts and functions
|
||||||
|
portable](zshguide03.html#l73)
|
||||||
|
|
||||||
|
### [3.10: Running scripts](zshguide03.html#l74)
|
||||||
|
|
||||||
|
## [Chapter 4: The Z-Shell Line Editor](zshguide04.html#l75)
|
||||||
|
|
||||||
|
### [4.1: Introducing zle](zshguide04.html#l76)
|
||||||
|
|
||||||
|
[4.1.1: The simple facts](zshguide04.html#l77)
|
||||||
|
|
||||||
|
[4.1.2: Vi mode](zshguide04.html#l78)
|
||||||
|
|
||||||
|
### [4.2: Basic editing](zshguide04.html#l79)
|
||||||
|
|
||||||
|
[4.2.1: Moving](zshguide04.html#l80)
|
||||||
|
|
||||||
|
[4.2.2: Deleting](zshguide04.html#l81)
|
||||||
|
|
||||||
|
[4.2.3: More deletion](zshguide04.html#l82)
|
||||||
|
|
||||||
|
### [4.3: Fancier editing](zshguide04.html#l83)
|
||||||
|
|
||||||
|
[4.3.1: Options controlling zle](zshguide04.html#l84)
|
||||||
|
|
||||||
|
[4.3.2: The minibuffer and extended commands](zshguide04.html#l85)
|
||||||
|
|
||||||
|
[4.3.3: Prefix (digit) arguments](zshguide04.html#l86)
|
||||||
|
|
||||||
|
[4.3.4: Words, regions and marks](zshguide04.html#l87)
|
||||||
|
|
||||||
|
[4.3.5: Regions and marks](zshguide04.html#l88)
|
||||||
|
|
||||||
|
### [4.4: History and searching](zshguide04.html#l89)
|
||||||
|
|
||||||
|
[4.4.1: Moving through the history](zshguide04.html#l90)
|
||||||
|
|
||||||
|
[4.4.2: Searching through the history](zshguide04.html#l91)
|
||||||
|
|
||||||
|
[4.4.3: Extracting words from the history](zshguide04.html#l92)
|
||||||
|
|
||||||
|
### [4.5: Binding keys and handling keymaps](zshguide04.html#l93)
|
||||||
|
|
||||||
|
[4.5.1: Simple key bindings](zshguide04.html#l94)
|
||||||
|
|
||||||
|
[4.5.2: Removing key bindings](zshguide04.html#l95)
|
||||||
|
|
||||||
|
[4.5.3: Function keys and so on](zshguide04.html#l96)
|
||||||
|
|
||||||
|
[4.5.4: Binding strings instead of commands](zshguide04.html#l97)
|
||||||
|
|
||||||
|
[4.5.5: Keymaps](zshguide04.html#l98)
|
||||||
|
|
||||||
|
### [4.6: Advanced editing](zshguide04.html#l99)
|
||||||
|
|
||||||
|
[4.6.1: Multi-line editing](zshguide04.html#l100)
|
||||||
|
|
||||||
|
[4.6.2: The builtin vared and the function zed](zshguide04.html#l101)
|
||||||
|
|
||||||
|
[4.6.3: The buffer stack](zshguide04.html#l102)
|
||||||
|
|
||||||
|
### [4.7: Extending zle](zshguide04.html#l103)
|
||||||
|
|
||||||
|
[4.7.1: Widgets](zshguide04.html#l104)
|
||||||
|
|
||||||
|
[4.7.2: Executing other widgets](zshguide04.html#l105)
|
||||||
|
|
||||||
|
[4.7.3: Some special builtin widgets and their
|
||||||
|
uses](zshguide04.html#l106)
|
||||||
|
|
||||||
|
[4.7.4: Special parameters: normal text](zshguide04.html#l107)
|
||||||
|
|
||||||
|
[4.7.5: Other special parameters](zshguide04.html#l108)
|
||||||
|
|
||||||
|
[4.7.6: Reading keys and using the minibuffer](zshguide04.html#l109)
|
||||||
|
|
||||||
|
[4.7.7: Examples](zshguide04.html#l110)
|
||||||
|
|
||||||
|
## [Chapter 5: Substitutions](zshguide05.html#l111)
|
||||||
|
|
||||||
|
### [5.1: Quoting](zshguide05.html#l112)
|
||||||
|
|
||||||
|
[5.1.1: Backslashes](zshguide05.html#l113)
|
||||||
|
|
||||||
|
[5.1.2: Single quotes](zshguide05.html#l114)
|
||||||
|
|
||||||
|
[5.1.3: POSIX quotes](zshguide05.html#l115)
|
||||||
|
|
||||||
|
[5.1.4: Double quotes](zshguide05.html#l116)
|
||||||
|
|
||||||
|
[5.1.5: Backquotes](zshguide05.html#l117)
|
||||||
|
|
||||||
|
### [5.2: Modifiers and what they modify](zshguide05.html#l118)
|
||||||
|
|
||||||
|
### [5.3: Process Substitution](zshguide05.html#l119)
|
||||||
|
|
||||||
|
### [5.4: Parameter substitution](zshguide05.html#l120)
|
||||||
|
|
||||||
|
[5.4.1: Using arrays](zshguide05.html#l121)
|
||||||
|
|
||||||
|
[5.4.2: Using associative arrays](zshguide05.html#l122)
|
||||||
|
|
||||||
|
[5.4.3: Substituted substitutions, top- and tailing,
|
||||||
|
etc.](zshguide05.html#l123)
|
||||||
|
|
||||||
|
[5.4.4: Flags for options: splitting and joining](zshguide05.html#l124)
|
||||||
|
|
||||||
|
[5.4.5: Flags for options: `GLOB_SUBST` and
|
||||||
|
`RC_EXPAND_PARAM`](zshguide05.html#l125)
|
||||||
|
|
||||||
|
[5.4.6: Yet more parameter flags](zshguide05.html#l126)
|
||||||
|
|
||||||
|
[5.4.7: A couple of parameter substitution tricks](zshguide05.html#l127)
|
||||||
|
|
||||||
|
[5.4.8: Nested parameter substitutions](zshguide05.html#l128)
|
||||||
|
|
||||||
|
### [5.5: That substitution again](zshguide05.html#l129)
|
||||||
|
|
||||||
|
### [5.6: Arithmetic Expansion](zshguide05.html#l130)
|
||||||
|
|
||||||
|
[5.6.1: Entering and outputting bases](zshguide05.html#l131)
|
||||||
|
|
||||||
|
[5.6.2: Parameter typing](zshguide05.html#l132)
|
||||||
|
|
||||||
|
### [5.7: Brace Expansion and Arrays](zshguide05.html#l133)
|
||||||
|
|
||||||
|
### [5.8: Filename Expansion](zshguide05.html#l134)
|
||||||
|
|
||||||
|
### [5.9: Filename Generation and Pattern Matching](zshguide05.html#l135)
|
||||||
|
|
||||||
|
[5.9.1: Comparing patterns and regular
|
||||||
|
expressions](zshguide05.html#l136)
|
||||||
|
|
||||||
|
[5.9.2: Standard features](zshguide05.html#l137)
|
||||||
|
|
||||||
|
[5.9.3: Extensions usually available](zshguide05.html#l138)
|
||||||
|
|
||||||
|
[5.9.4: Extensions requiring `EXTENDED_GLOB`](zshguide05.html#l139)
|
||||||
|
|
||||||
|
[5.9.5: Recursive globbing](zshguide05.html#l140)
|
||||||
|
|
||||||
|
[5.9.6: Glob qualifiers](zshguide05.html#l141)
|
||||||
|
|
||||||
|
[5.9.7: Globbing flags: alter the behaviour of
|
||||||
|
matches](zshguide05.html#l142)
|
||||||
|
|
||||||
|
[5.9.8: The function `zmv`](zshguide05.html#l143)
|
||||||
|
|
||||||
|
## [Chapter 6: Completion, old and new](zshguide06.html#l144)
|
||||||
|
|
||||||
|
### [6.1: Completion and expansion](zshguide06.html#l145)
|
||||||
|
|
||||||
|
### [6.2: Configuring completion using shell options](zshguide06.html#l146)
|
||||||
|
|
||||||
|
[6.2.1: Ambiguous completions](zshguide06.html#l147)
|
||||||
|
|
||||||
|
[6.2.2: `ALWAYS_LAST_PROMPT`](zshguide06.html#l148)
|
||||||
|
|
||||||
|
[6.2.3: Menu completion and menu selection](zshguide06.html#l149)
|
||||||
|
|
||||||
|
[6.2.4: Other ways of changing completion
|
||||||
|
behaviour](zshguide06.html#l150)
|
||||||
|
|
||||||
|
[6.2.5: Changing the way completions are
|
||||||
|
displayed](zshguide06.html#l151)
|
||||||
|
|
||||||
|
### [6.3: Getting started with new completion](zshguide06.html#l152)
|
||||||
|
|
||||||
|
### [6.4: How the shell finds the right completions](zshguide06.html#l153)
|
||||||
|
|
||||||
|
[6.4.1: Contexts](zshguide06.html#l154)
|
||||||
|
|
||||||
|
[6.4.2: Tags](zshguide06.html#l155)
|
||||||
|
|
||||||
|
### [6.5: Configuring completion using styles](zshguide06.html#l156)
|
||||||
|
|
||||||
|
[6.5.1: Specifying completers and their options](zshguide06.html#l157)
|
||||||
|
|
||||||
|
[6.5.2: Changing the format of listings: groups
|
||||||
|
etc.](zshguide06.html#l158)
|
||||||
|
|
||||||
|
[6.5.3: Styles affecting particular completions](zshguide06.html#l159)
|
||||||
|
|
||||||
|
### [6.6: Command widgets](zshguide06.html#l160)
|
||||||
|
|
||||||
|
[6.6.1: `_complete_help`](zshguide06.html#l161)
|
||||||
|
|
||||||
|
[6.6.2: `_correct_word`, `_correct_filename`,
|
||||||
|
`_expand_word`](zshguide06.html#l162)
|
||||||
|
|
||||||
|
[6.6.3: `_history_complete_word`](zshguide06.html#l163)
|
||||||
|
|
||||||
|
[6.6.4: `_most_recent_file`](zshguide06.html#l164)
|
||||||
|
|
||||||
|
[6.6.5: `_next_tags`](zshguide06.html#l165)
|
||||||
|
|
||||||
|
[6.6.6: `_bash_completions`](zshguide06.html#l166)
|
||||||
|
|
||||||
|
[6.6.7: `_read_comp`](zshguide06.html#l167)
|
||||||
|
|
||||||
|
[6.6.8: `_generic`](zshguide06.html#l168)
|
||||||
|
|
||||||
|
[6.6.9: `predict-on`, `incremental-complete-word`](zshguide06.html#l169)
|
||||||
|
|
||||||
|
### [6.7: Matching control and controlling where things are inserted](zshguide06.html#l170)
|
||||||
|
|
||||||
|
[6.7.1: Case-insensitive matching](zshguide06.html#l171)
|
||||||
|
|
||||||
|
[6.7.2: Matching option names](zshguide06.html#l172)
|
||||||
|
|
||||||
|
[6.7.3: Partial word completion](zshguide06.html#l173)
|
||||||
|
|
||||||
|
[6.7.4: Substring completion](zshguide06.html#l174)
|
||||||
|
|
||||||
|
[6.7.5: Partial words with capitals](zshguide06.html#l175)
|
||||||
|
|
||||||
|
[6.7.6: Final notes](zshguide06.html#l176)
|
||||||
|
|
||||||
|
### [6.8: Tutorial](zshguide06.html#l177)
|
||||||
|
|
||||||
|
[6.8.1: The dispatcher](zshguide06.html#l178)
|
||||||
|
|
||||||
|
[6.8.2: Subcommand completion: `_arguments`](zshguide06.html#l179)
|
||||||
|
|
||||||
|
[6.8.3: Completing particular argument types](zshguide06.html#l180)
|
||||||
|
|
||||||
|
[6.8.4: The rest](zshguide06.html#l181)
|
||||||
|
|
||||||
|
### [6.9: Writing new completion functions and widgets](zshguide06.html#l182)
|
||||||
|
|
||||||
|
[6.9.1: Loading completion functions: `compdef`](zshguide06.html#l183)
|
||||||
|
|
||||||
|
[6.9.2: Adding a set of completions: `compadd`](zshguide06.html#l184)
|
||||||
|
|
||||||
|
[6.9.3: Functions for generating filenames, etc.](zshguide06.html#l185)
|
||||||
|
|
||||||
|
[6.9.4: The `zsh/parameter` module](zshguide06.html#l186)
|
||||||
|
|
||||||
|
[6.9.5: Special completion parameters and
|
||||||
|
`compset`](zshguide06.html#l187)
|
||||||
|
|
||||||
|
[6.9.6: Fancier completion: using the tags and styles
|
||||||
|
mechanism](zshguide06.html#l188)
|
||||||
|
|
||||||
|
[6.9.7: Getting the work done for you: handling arguments
|
||||||
|
etc.](zshguide06.html#l189)
|
||||||
|
|
||||||
|
[6.9.8: More completion utility functions](zshguide06.html#l190)
|
||||||
|
|
||||||
|
### [6.10: Finally](zshguide06.html#l191)
|
||||||
|
|
||||||
|
## [Chapter 7: Modules and other bits and pieces *Not written*](zshguide07.html#l192)
|
||||||
|
|
||||||
|
### [7.1: Control over modules: `zmodload`](zshguide07.html#l193)
|
||||||
|
|
||||||
|
[7.1.1: Modules defining parameters](zshguide07.html#l194)
|
||||||
|
|
||||||
|
[7.1.2: Low-level system interaction](zshguide07.html#l195)
|
||||||
|
|
||||||
|
[7.1.3: ZFTP](zshguide07.html#l196)
|
||||||
|
|
||||||
|
### [7.2: Contributed bits](zshguide07.html#l197)
|
||||||
|
|
||||||
|
[7.2.1: Prompt themes](zshguide07.html#l198)
|
||||||
|
|
||||||
|
### [7.3: What's new in 4.1](zshguide07.html#l199)
|
||||||
|
|
||||||
|
## [Appendix 1: Obtaining zsh and getting more information *Not written*](zshguide08.html#l200)
|
||||||
|
|
||||||
|
-----
|
289
zsh_guide/src/zshguide01.md
Normal file
@ -0,0 +1,289 @@
|
|||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
|
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
|
||||||
|
|
||||||
|
- [Chapter 1: A short introduction](#chapter-1-a-short-introduction)
|
||||||
|
- [1.1: Other shells and other guides](#11-other-shells-and-other-guides)
|
||||||
|
- [1.2: Versions of zsh](#12-versions-of-zsh)
|
||||||
|
- [1.3: Conventions](#13-conventions)
|
||||||
|
- [1.4: Acknowledgments](#14-acknowledgments)
|
||||||
|
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
|
<span id="intro"></span><span id="l1"></span>
|
||||||
|
|
||||||
|
# Chapter 1: A short introduction
|
||||||
|
|
||||||
|
The Z-Shell, \`zsh' for short, is a command interpreter for UNIX
|
||||||
|
systems, or in UNIX jargon, a \`shell', because it wraps around the
|
||||||
|
commands you use. More than that, however, zsh is a particularly
|
||||||
|
powerful shell --- and it's free, and under regular maintenance --- with
|
||||||
|
lots of interactive features allowing you to do the maximum work with
|
||||||
|
the minimum fuss. Of course, for that you need to know what the shell
|
||||||
|
can do and how, and that's what this guide is for.
|
||||||
|
|
||||||
|
The most basic basics: I shall assume you have access to a UNIX system,
|
||||||
|
otherwise the rest of this is not going to be much use. You can also use
|
||||||
|
zsh under Windows by installing Cygwin, which provides a UNIX-like
|
||||||
|
environment for programmes --- given the weakness of the standard
|
||||||
|
Windows command interpreter, this is a good thing to do. There are ports
|
||||||
|
of older versions of zsh to Windows which run natively, i.e. without a
|
||||||
|
UNIX environment, although these have a slightly different behaviour in
|
||||||
|
some respects and I won't talk about them further.
|
||||||
|
|
||||||
|
I'll also assume some basic knowledge of UNIX; you should know how the
|
||||||
|
filesystem works, i.e. what `/home/users/pws/.zshrc` and `../file` mean,
|
||||||
|
and some basic commands, for example `ls`, and you should have
|
||||||
|
experience with using `rm` to delete completely the wrong file by
|
||||||
|
accident, and that sort of thing. In something like \``rm file`', I will
|
||||||
|
often refer to the \`command' (`rm`, of course) and the \`argument(s)'
|
||||||
|
(anything else coming after the command which is used by it), and to the
|
||||||
|
complete thing you typed in one go as the \`command line'.
|
||||||
|
|
||||||
|
You're also going to need zsh itself; if you're reading this, you may
|
||||||
|
well already have it, but if you don't, you or your system administrator
|
||||||
|
should read [Appendix A](zshguide08.html#appa). For now, we'll suppose
|
||||||
|
you're sitting in front of a terminal with zsh already running.
|
||||||
|
|
||||||
|
Now to the shell. After you log in, you probably see some prompt (a
|
||||||
|
series of symbols on the screen indicating that you can input a
|
||||||
|
command), such as \``$`' or \``%`', possibly with some other text in
|
||||||
|
front --- later, we'll see how you can change that text in interesting
|
||||||
|
ways. That prompt comes from the shell. Type \``print hello`', then
|
||||||
|
backspace over \``hello`' and type \``goodbye`'. Now hit the \`Return'
|
||||||
|
key (or \`Enter' key, I'll just say `<RET>` from now on, likewise
|
||||||
|
`<TAB>` for the tab key, `<SPC>` for the space key); unless you have a
|
||||||
|
serious practical-joker problem on your system, you will see
|
||||||
|
\``goodbye`', and the shell will come back with another prompt. All of
|
||||||
|
the time up to when you hit `<RET>`, you were interacting with the shell
|
||||||
|
and its editor, called \`Z-Shell Line Editor' or \`zle' for short; only
|
||||||
|
then did the shell go away and tell the `print` command to print out a
|
||||||
|
message. So you can see that the shell is important.
|
||||||
|
|
||||||
|
However, if all you're doing is typing simple commands like that, why do
|
||||||
|
you need anything complicated? In that case, you don't; but real life's
|
||||||
|
not that simple. In the rest of this guide, I describe how, with zsh's
|
||||||
|
help, you can:
|
||||||
|
|
||||||
|
- customise the environment in which you work, by using startup files,
|
||||||
|
- write your own commands to shorten tasks and store things in shell
|
||||||
|
variables (\`parameters') so you don't have to remember them,
|
||||||
|
- use zle to minimise the amount of typing you have to do --- in zsh,
|
||||||
|
you can even edit small files that way,
|
||||||
|
- pick the files you want to use for a particular command such as `mv`
|
||||||
|
or `ls` using zsh's very sophisticated filename generation (known
|
||||||
|
colloquially as \`globbing') system,
|
||||||
|
- tell the editor what sort of arguments you use with particular
|
||||||
|
commands, so that you only need to type part of the name and it will
|
||||||
|
complete the rest, using zsh's unrivalled programmable completion
|
||||||
|
system,
|
||||||
|
- use the extra add-ons (\`modules') supplied with the latest version
|
||||||
|
of zsh to do other things you usually can't do in a shell at all.
|
||||||
|
|
||||||
|
That's only a tiny sample. Since there's so much to say, this guide will
|
||||||
|
concentrate on the things zsh does best, and in particular the things it
|
||||||
|
has which other shells don't. The next chapter gives a few of the
|
||||||
|
basics, by trying to explain how to set the shell up the way you want
|
||||||
|
it. Like the rest of the guide, it's not intended to be exhaustive, for
|
||||||
|
which you should look at the shell manual.
|
||||||
|
|
||||||
|
Some other things you should probably know straight away. First, the
|
||||||
|
shell is always running, even when the command you typed is running,
|
||||||
|
too; the shell simply hangs around waiting for it to finish: you may
|
||||||
|
know from other shells about putting commands in the **background** by
|
||||||
|
putting an \``&`' after the command, which means that the shell doesn't
|
||||||
|
wait for them to finish. The shell is there even if the command's in the
|
||||||
|
foreground, but in this case doing nothing.
|
||||||
|
|
||||||
|
Second, it doesn't just run other people's commands, it has some of its
|
||||||
|
own, called **builtin commands** or just **builtins**, and you can even
|
||||||
|
add your own commands as lists of instructions to the shell called
|
||||||
|
**functions**; builtins and functions always run in the shell itself.
|
||||||
|
That's important to know, because things which don't run in the shell
|
||||||
|
itself can't affect it, and hence can't alter parameters, functions,
|
||||||
|
aliases, and all the other things I shall talk about.
|
||||||
|
|
||||||
|
<span id="l2"></span>
|
||||||
|
|
||||||
|
## 1.1: Other shells and other guides
|
||||||
|
|
||||||
|
If you want a basic grounding in how shells work, what their syntax is
|
||||||
|
(i.e. how to write commands), and how to write scripts and functions,
|
||||||
|
you should read one of the many books on the subject. In particular, you
|
||||||
|
will get most out of a book that describes the Korn shell (ksh), as zsh
|
||||||
|
is very similar to this --- so similar that it will be worth my while
|
||||||
|
pointing out differences as we go along, since they can confuse ksh
|
||||||
|
users. Recent versions of zsh can emulate ksh (strictly, the 1988
|
||||||
|
version of ksh, although there are increasingly features from the 1993
|
||||||
|
version) quite closely, although it's not perfect, and less perfect the
|
||||||
|
more closely you look. However, it's important to realise that if you
|
||||||
|
just start up any old zsh there is no guarantee that it will be set up
|
||||||
|
to work like ksh; unless you or your system adminstrator have changed
|
||||||
|
some settings, it certainly won't be. You might not see that straight
|
||||||
|
away, but it affects the shell in subtle ways. I will talk about
|
||||||
|
emulation a bit more later on.
|
||||||
|
|
||||||
|
A few other shells are worth mentioning. The grandfather of all UNIX
|
||||||
|
shells is sh, now known as the Bourne shell but originally just referred
|
||||||
|
to as \`the shell'. The story is similar to ksh: zsh can emulate sh
|
||||||
|
quite closely (much more closely than ksh, since sh is considerably
|
||||||
|
simpler), but in general you need to make sure it's set up to do that
|
||||||
|
before you can be sure it will emulate sh.
|
||||||
|
|
||||||
|
You may also come across the \`Bourne-Again Shell', bash. This is a
|
||||||
|
freely-available enhancement of sh written by the GNU project --- but it
|
||||||
|
is not always enhanced along the lines of ksh, and hence in many ways it
|
||||||
|
is very different from zsh. On some free UNIX-like systems such as
|
||||||
|
Linux/GNU (which is what people usually mean by Linux), the command sh
|
||||||
|
is really bash, so there you should be extra careful when trying to
|
||||||
|
ensure that something which runs under the so-called \`sh' will also run
|
||||||
|
under zsh. Some Linux systems also have another simpler Bourne shell
|
||||||
|
clone, ash; as it's simpler, it's more like the original Bourne shell.
|
||||||
|
|
||||||
|
Some more modern operating systems talk about \`the POSIX shell'. This
|
||||||
|
is an attempt to standardize UNIX shells; it's most like the Korn shell,
|
||||||
|
although, a bit confusingly, it's often just called sh, because the
|
||||||
|
standard says that it should be. Usually, this just means you get a bit
|
||||||
|
extra free with your sh and it still does what you expect. Zsh has made
|
||||||
|
some attempts to fit the standard, but you have to tell it to --- again,
|
||||||
|
simply starting up \`zsh' will not have the right settings for that.
|
||||||
|
|
||||||
|
There is another common family of shells with, unfortunately,
|
||||||
|
incompatible syntax. The source of this family is the C-Shell, csh, so
|
||||||
|
called because its syntax looks more like the C programming language.
|
||||||
|
This became widespread when the only other shell available was sh
|
||||||
|
because csh had better interactive features, such as job control. It was
|
||||||
|
then enhanced to make tcsh, which has many of the interactive features
|
||||||
|
you will also find in zsh, and so became very popular. Despite these
|
||||||
|
common features, the syntax of zsh is very different, so you should not
|
||||||
|
try and use csh/tcsh commands beyond the very simplest in zsh; but if
|
||||||
|
you are a tcsh user, you will find virtually every capability you are
|
||||||
|
used to in zsh somewhere, plus a lot more.
|
||||||
|
|
||||||
|
<span id="l3"></span>
|
||||||
|
|
||||||
|
## 1.2: Versions of zsh
|
||||||
|
|
||||||
|
At the time of writing, the most recent version of zsh available for
|
||||||
|
widespread use was 4.0.6. You will commonly find two sets of older zsh's
|
||||||
|
around. The 3.0 series, of which the last release was 3.0.9, was a
|
||||||
|
stable release, with only bug fixes since the first release of zsh 3.
|
||||||
|
The 3.1 series were beta versions, with lots of new features; the last
|
||||||
|
of these, 3.1.9, was not so different from 4.0.1; the main change is
|
||||||
|
that the shell has now been declared stable, so that as with zsh 3 there
|
||||||
|
will be a set of bug fixes, labelled 4.0, and a set with new functions
|
||||||
|
in, labelled 4.1. As 4.0 replaces all zsh 3 versions, I will try to keep
|
||||||
|
things simple and talk about that; but every now and then it will be
|
||||||
|
helpful to point out where older versions were different.
|
||||||
|
|
||||||
|
One notable feature of zsh is the completion of command line arguments.
|
||||||
|
The system changed in 3.1.6 and 3.1.7 to make it a lot more
|
||||||
|
configurable, and (provided you keep your wits about you) a little less
|
||||||
|
obscure. I therefore won't describe the old completion system, which
|
||||||
|
used the \`compctl' command, in any detail; a very brief introduction is
|
||||||
|
given in the zsh FAQ. The old system remains available, however we
|
||||||
|
strongly recommend new users to start with the new one. See [chapter
|
||||||
|
6](zshguide06.html#comp) \`Completion, old and new' for the lowdown on
|
||||||
|
new-style completion.
|
||||||
|
|
||||||
|
There won't be a big difference between 4.0 and 4.1, just bug fixes and
|
||||||
|
a few evolutionary changes, plus some extra modules. There will be some
|
||||||
|
notes in [chapter 7](zshguide07.html#ragbag) about new features in 4.1,
|
||||||
|
but nothing you write for 4.0 is likely to become obsolete in the
|
||||||
|
foreseeable future.
|
||||||
|
|
||||||
|
<span id="l4"></span>
|
||||||
|
|
||||||
|
## 1.3: Conventions
|
||||||
|
|
||||||
|
Most of what I say will be reasonably self-contained (which means I use
|
||||||
|
phrases like \`as I said before' and \`as I'll discuss later on' more
|
||||||
|
than a real stylist would like, and the number times I refer to other
|
||||||
|
chapters is excessive), but there are some points I should perhaps draw
|
||||||
|
your attention to before you leap in.
|
||||||
|
|
||||||
|
I will often write chunks of code as you would put them in a file for
|
||||||
|
execution (a \`script' or a \`function', the differences to be discussed
|
||||||
|
*passim*):
|
||||||
|
|
||||||
|
```
|
||||||
|
if [[ $ZSH_VERSION = 3.* ]]; then
|
||||||
|
print This is a release of the third version of zsh.
|
||||||
|
else
|
||||||
|
print This is either very new or very old.
|
||||||
|
fi
|
||||||
|
```
|
||||||
|
|
||||||
|
but sometimes I will show both what you type into a shell interactively,
|
||||||
|
and what the shell throws back at you:
|
||||||
|
|
||||||
|
```
|
||||||
|
% print $ZSH_VERSION
|
||||||
|
3.1.9
|
||||||
|
% print $CPUTYPE
|
||||||
|
i586
|
||||||
|
```
|
||||||
|
|
||||||
|
Here, \``%`' shows the prompt the shell puts up to tell you it is
|
||||||
|
expecting input (and the space immediately after is part of it).
|
||||||
|
Actually, you probably see something before the percent sign like the
|
||||||
|
name of the machine or your user name, or maybe something fancier. I've
|
||||||
|
pruned it to the minimum to avoid confusion, and kept it as reminder
|
||||||
|
that this is the line you type.
|
||||||
|
|
||||||
|
If you're reading an electronic version of this guide, and want to copy
|
||||||
|
lines with the \``%`' in front into a terminal to be executed, there's a
|
||||||
|
neat way of doing this where you don't even have to edit the line first:
|
||||||
|
|
||||||
|
```
|
||||||
|
alias %=' '
|
||||||
|
```
|
||||||
|
|
||||||
|
Then `%` at the start of a line is turned into nothing whatsoever; the
|
||||||
|
space just indicates that any following aliases should be expanded. So
|
||||||
|
the line \``% print $CPUTYPE`' will ignore the \``%`' and execute the
|
||||||
|
rest of the line. (I hope it's obvious, but your *own* prompt is always
|
||||||
|
ignored; this is just if you copy the prompts from the guide into the
|
||||||
|
shell.)
|
||||||
|
|
||||||
|
There are lots of different types of object in zsh, but one of the most
|
||||||
|
common is parameters, which I will always show with a \``$`' sign in
|
||||||
|
front, like \``$ZSH_VERSION`', to remind you they are parameters. You
|
||||||
|
need to remember that when you're setting or fiddling with the parameter
|
||||||
|
itself, rather than its value, you omit the \``$`'. When you do and
|
||||||
|
don't need it should become clearer as we go along.
|
||||||
|
|
||||||
|
The other objects I'll show specially are shell options --- choices
|
||||||
|
about how the shell is to work --- which I write like this:
|
||||||
|
\``SH_WORD_SPLIT`', \``NO_NOMATCH`', \``ZLE`'. Again, that's not the
|
||||||
|
whole story since whenever the shell expects options you can write them
|
||||||
|
in upper or lower case with as many or as few underscores as you like;
|
||||||
|
and often in code chunks I'll use the simplest form instead:
|
||||||
|
\``shwordsplit`', \``nonomatch`', \``zle`'. If you're philosophical you
|
||||||
|
can think of it as expressing the category difference between talking
|
||||||
|
about programming and actual programming, but really it's just me being
|
||||||
|
inconsistent.
|
||||||
|
|
||||||
|
You may find it odd that I use three hyphens to signify a dash. That's
|
||||||
|
actually a convention used in the printed version of this guide, which
|
||||||
|
is made with LaTeX. One day, I will turn this into a macro and it will
|
||||||
|
appear properly in other versions; but then, one day the universe will
|
||||||
|
come to an end.
|
||||||
|
|
||||||
|
<span id="l5"></span>
|
||||||
|
|
||||||
|
## 1.4: Acknowledgments
|
||||||
|
|
||||||
|
I am grateful for comments from various zsh users. In particular, I have
|
||||||
|
had detailed comments and corrections from Bart Schaefer, Sven \`Mr
|
||||||
|
Completion' Wischnowsky and Oliver Kiddle. It's usual to add that any
|
||||||
|
remaining errors are my own, but that's so stark staringly obvious as to
|
||||||
|
be ridiculous. I mean, who wrote this? Never mind.
|
||||||
|
|
||||||
|
Most of this written on one or another release of Linux Mandrake (a
|
||||||
|
derivative of Red Hat), with the usual GNU and XFree86 tools. Since all
|
||||||
|
of this was free, it only seems fair to say \`thank you' for the gift.
|
||||||
|
It also works a lot better than the operating system that came with this
|
||||||
|
particular PC.
|
||||||
|
|
||||||
|
|
2266
zsh_guide/src/zshguide02.md
Normal file
6608
zsh_guide/src/zshguide03.md
Normal file
2246
zsh_guide/src/zshguide04.md
Normal file
4246
zsh_guide/src/zshguide05.md
Normal file
5783
zsh_guide/src/zshguide06.md
Normal file
48
zsh_guide/src/zshguide07.md
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
|
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
|
||||||
|
|
||||||
|
- [Chapter 7: Modules and other bits and pieces *Not written*](#chapter-7-modules-and-other-bits-and-pieces-not-written)
|
||||||
|
- [7.1: Control over modules: `zmodload`](#71-control-over-modules-zmodload)
|
||||||
|
- [7.1.1: Modules defining parameters](#711-modules-defining-parameters)
|
||||||
|
- [7.1.2: Low-level system interaction](#712-low-level-system-interaction)
|
||||||
|
- [7.1.3: ZFTP](#713-zftp)
|
||||||
|
- [7.2: Contributed bits](#72-contributed-bits)
|
||||||
|
- [7.2.1: Prompt themes](#721-prompt-themes)
|
||||||
|
- [7.3: What's new in 4.1](#73-whats-new-in-41)
|
||||||
|
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
|
<span id="ragbag"></span><span id="l192"></span>
|
||||||
|
|
||||||
|
# Chapter 7: Modules and other bits and pieces *Not written*
|
||||||
|
|
||||||
|
<span id="l193"></span>
|
||||||
|
|
||||||
|
## 7.1: Control over modules: `zmodload`
|
||||||
|
|
||||||
|
<span id="l194"></span>
|
||||||
|
|
||||||
|
### 7.1.1: Modules defining parameters
|
||||||
|
|
||||||
|
<span id="l195"></span>
|
||||||
|
|
||||||
|
### 7.1.2: Low-level system interaction
|
||||||
|
|
||||||
|
<span id="l196"></span>
|
||||||
|
|
||||||
|
### 7.1.3: ZFTP
|
||||||
|
|
||||||
|
<span id="l197"></span>
|
||||||
|
|
||||||
|
## 7.2: Contributed bits
|
||||||
|
|
||||||
|
<span id="l198"></span>
|
||||||
|
|
||||||
|
### 7.2.1: Prompt themes
|
||||||
|
|
||||||
|
<span id="l199"></span>
|
||||||
|
|
||||||
|
## 7.3: What's new in 4.1
|
||||||
|
|
||||||
|
|
20
zsh_guide/src/zshguide08.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
|
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
|
||||||
|
|
||||||
|
- [Appendix 1: Obtaining zsh and getting more information *Not written*](#appendix-1-obtaining-zsh-and-getting-more-information-not-written)
|
||||||
|
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
- [Table of Contents](zshguide.html)
|
||||||
|
- [Previous Chapter](zshguide07.html)
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
<span id="l200"></span>
|
||||||
|
|
||||||
|
# Appendix 1: Obtaining zsh and getting more information *Not written*
|
||||||
|
|
||||||
|
<span id="appa"></span>
|
1
zsh_manual/book/.nojekyll
Normal file
@ -0,0 +1 @@
|
|||||||
|
This file makes sure that Github Pages doesn't process mdBook's output.
|
@ -138,13 +138,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
4
zsh_manual/book/FontAwesome/css/font-awesome.css
vendored
Normal file
BIN
zsh_manual/book/FontAwesome/fonts/FontAwesome.ttf
Normal file
BIN
zsh_manual/book/FontAwesome/fonts/fontawesome-webfont.eot
Normal file
2671
zsh_manual/book/FontAwesome/fonts/fontawesome-webfont.svg
Normal file
After Width: | Height: | Size: 434 KiB |
BIN
zsh_manual/book/FontAwesome/fonts/fontawesome-webfont.ttf
Normal file
BIN
zsh_manual/book/FontAwesome/fonts/fontawesome-webfont.woff
Normal file
BIN
zsh_manual/book/FontAwesome/fonts/fontawesome-webfont.woff2
Normal file
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
@ -136,13 +136,15 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="search-wrapper" class="hidden">
|
<div id="search-wrapper" class="hidden">
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
<form id="searchbar-outer" class="searchbar-outer">
|
||||||
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||||||
</form>
|
</form>
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
<div id="searchresults-header" class="searchresults-header"></div>
|
79
zsh_manual/book/ayu-highlight.css
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
Based off of the Ayu theme
|
||||||
|
Original by Dempfi (https://github.com/dempfi/ayu)
|
||||||
|
*/
|
||||||
|
|
||||||
|
.hljs {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
background: #191f26;
|
||||||
|
color: #e6e1cf;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-comment,
|
||||||
|
.hljs-quote {
|
||||||
|
color: #5c6773;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-variable,
|
||||||
|
.hljs-template-variable,
|
||||||
|
.hljs-attribute,
|
||||||
|
.hljs-attr,
|
||||||
|
.hljs-regexp,
|
||||||
|
.hljs-link,
|
||||||
|
.hljs-selector-id,
|
||||||
|
.hljs-selector-class {
|
||||||
|
color: #ff7733;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-number,
|
||||||
|
.hljs-meta,
|
||||||
|
.hljs-builtin-name,
|
||||||
|
.hljs-literal,
|
||||||
|
.hljs-type,
|
||||||
|
.hljs-params {
|
||||||
|
color: #ffee99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-string,
|
||||||
|
.hljs-bullet {
|
||||||
|
color: #b8cc52;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-title,
|
||||||
|
.hljs-built_in,
|
||||||
|
.hljs-section {
|
||||||
|
color: #ffb454;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-keyword,
|
||||||
|
.hljs-selector-tag,
|
||||||
|
.hljs-symbol {
|
||||||
|
color: #ff7733;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-name {
|
||||||
|
color: #36a3d9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-tag {
|
||||||
|
color: #00568d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-emphasis {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-addition {
|
||||||
|
color: #91b362;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-deletion {
|
||||||
|
color: #d96c75;
|
||||||
|
}
|