general: Reformat documentation with better formatting and wording
General purpose reformating and rewording in (a few places). This should
also make markdown linting happier.
Prefer back-ticks wherever useful and use `console` for code blocks to
be executed on terminal.
Also, update references links wherever possible (including update from
'http://' to 'https://').
master
Indrajit Raychaudhuri4 years agocommitted byIndrajit Raychaudhuri
Integrates [zsh-autosuggestions][1] into Prezto, which implements the
[Fish shell][2]'s autosuggestions feature, where the user can type in any part
@ -13,15 +12,13 @@ If this module is used in conjunction with the *history-substring-search*
@@ -13,15 +12,13 @@ If this module is used in conjunction with the *history-substring-search*
module, this module must be loaded **after** the *history-substring-search*
module.
Contributors
------------
## Contributors
New features and bug fixes should be submitted to the [zsh-autosuggestions][1]
project according to its rules and regulations. This module will be synchronized
against it.
Settings
--------
## Settings
### Highlighting
@ -29,33 +26,31 @@ If colors are enabled, *autosuggestions* will automatically highlight
@@ -29,33 +26,31 @@ If colors are enabled, *autosuggestions* will automatically highlight
positive results.
To enable highlighting for this module only, add the following line to
*zpreztorc*:
*~/.zpreztorc*:
```sh
zstyle ':prezto:module:autosuggestions' color 'yes'
```
To set the query found color, add the following line to *zpreztorc*:
To set the query found color, add the following line to *~/.zpreztorc*:
```sh
zstyle ':prezto:module:autosuggestions:color' found ''
```
Troubleshooting
---------------
## Troubleshooting
### Autosuggestions from previous sessions don't show up
For autosuggestions from previous shell sessions to work, please make sure you
also have the `history` module enabled.
Authors
-------
## Authors
*The authors of this module should be contacted via the [issue tracker][3].*
When you try to use a command that is not available locally, searches
the package manager for a package offering that command and suggests
the proper install command.
When you try to use a command that is not available locally, searches the
package manager for a package offering that command and suggests the proper
install command.
Debian and Arch Linux based distributions use the [`command-not-found`][1] tool.
@ -11,14 +10,12 @@ macOS uses Homebrew's [`command-not-found` clone][2]. Note that unless you have
@@ -11,14 +10,12 @@ macOS uses Homebrew's [`command-not-found` clone][2]. Note that unless you have
a recent version of Homebrew installed, you might also need to tap the
`command-not-found` Homebrew repository [following the instructions][3].
Authors
-------
## Authors
*The authors of this module should be contacted via the [issue tracker][4].*
To enable the prompt context to be set, add the following to your
*zpreztorc*.
*~/.zpreztorc*.
```sh
zstyle ':prezto:module:editor' ps-context 'yes'
```
Theming
-------
## Theming
To indicate when the editor is in the primary keymap (emacs or viins), add
the following to your `theme_prompt_setup` function.
@ -84,8 +79,7 @@ zstyle ':prezto:module:editor:info:completing' format '...'
@@ -84,8 +79,7 @@ zstyle ':prezto:module:editor:info:completing' format '...'
Then add `$editor_info[context]`, where context is *keymap*, *insert*, or
*overwrite*, to `$PROMPT` or `$RPROMPT`.
Convenience Functions
---------------------
## Convenience Functions
### bindkey-all
@ -99,11 +93,10 @@ It will also pass through arguments so you can use bindkey-all to set bindings
@@ -99,11 +93,10 @@ It will also pass through arguments so you can use bindkey-all to set bindings
for all keymaps at once. If provided arguments it will *not* print out the
names of each of the keymaps, and just run the command for each keymap.
Authors
-------
## Authors
*The authors of this module should be contacted via the [issue tracker][1].*
- `gb` lists, creates, renames, and deletes branches.
- `gbc` creates a new branch.
- `gbl` lists branches and their commits. (also `gbv`)
- `gbL` lists all local and remote branches and their commits.
- `gbr` renames a branch. (also `gbm`)
- `gbR` renames a branch even if the new branch name already exists. (also
- `gb` lists, creates, renames, and deletes branches.
- `gbc` creates a new branch.
- `gbl` lists branches and their commits. (also `gbv`)
- `gbL` lists all local and remote branches and their commits.
- `gbr` renames a branch. (also `gbm`)
- `gbR` renames a branch even if the new branch name already exists. (also
`gbM`)
- `gbs` lists branches and their commits with ancestry graphs.
- `gbS` lists local and remote branches and their commits with ancestry
graphs.
- `gbV` lists branches with more verbose information about their commits.
- `gbx` deletes a branch. (also `gbd`)
- `gbX` deletes a branch irrespective of its merged status. (also `gbD`)
### Commit
- `gc` records changes to the repository.
- `gca` stages all modified and deleted files.
- `gcm` records changes to the repository with the given message.
- `gcS` records changes to the repository. (Signed)
- `gcSa` stages all modified and deleted files. (Signed)
- `gcSm` records changes to the repository with the given message. (Signed)
- `gcam` stages all modified and deleted files, and records changes to the repository with the given message.
- `gco` checks out a branch or paths to work tree.
- `gcO` checks out hunks from the index or the tree interactively.
- `gcf` amends the tip of the current branch using the same log message as *HEAD*.
- `gcSf` amends the tip of the current branch using the same log message as*HEAD*. (Signed)
- `gcF` amends the tip of the current branch.
- `gcSF` amends the tip of the current branch. (Signed)
- `gcp` applies changes introduced by existing commits.
- `gcP` applies changes introduced by existing commits without committing.
- `gcr` reverts existing commits by reverting patches and recording new
commits.
- `gcR` removes the *HEAD* commit.
- `gcs` displays various types of objects.
- `gcsS` displays commits with GPG signature.
- `gcl` lists lost commits.
- `gcy` displays commits yet to be applied to upstream in the short format.
- `gcY` displays commits yet to be applied to upstream.
### Conflict
- `gCl` lists unmerged files.
- `gCa` adds unmerged file contents to the index.
- `gCe` executes merge-tool on all unmerged file.
- `gCo` checks out our changes for unmerged paths.
- `gCO` checks out our changes for all unmerged paths.
- `gCt` checks out their changes for unmerged paths.
- `gCT` checks out their changes for all unmerged paths.
### Data
- `gd` displays information about files in the index and the work tree.
- `gdc` lists cached files.
- `gdx` lists deleted files.
- `gdm` lists modified files.
- `gdu` lists untracked files.
- `gdk` lists killed files.
- `gdi` lists ignored files.
### Fetch
- `gf` downloads objects and references from another repository.
- `gfa` downloads objects and references from all remote repositories.
- `gfc` clones a repository into a new directory.
- `gfcr` clones a repository into a new directory including all submodules.
- `gfm` fetches from and merges with another repository or local branch.
- `gfr` fetches from and rebases on another repository or local branch.
### Flow
- `gFi` is short for `git flow init`
#### Feature
- `gFf` is short for `git flow feature`
- `gFfl` is short for `git flow feature list`
- `gFfs` is short for `git flow feature start`
- `gFff` is short for `git flow feature finish`
- `gFfp` is short for `git flow feature publish`
- `gFft` is short for `git flow feature track`
- `gFfd` is short for `git flow feature diff`
- `gFfr` is short for `git flow feature rebase`
- `gFfc` is short for `git flow feature checkout`
- `gFfm` is short for `git flow feature pull`
- `gFfx` is short for `git flow feature delete`
#### Bugfix
- `gFb` is short for `git flow bugfix`
- `gFbl` is short for `git flow bugfix list`
- `gFbs` is short for `git flow bugfix start`
- `gFbf` is short for `git flow bugfix finish`
- `gFbp` is short for `git flow bugfix publish`
- `gFbt` is short for `git flow bugfix track`
- `gFbd` is short for `git flow bugfix diff`
- `gFbr` is short for `git flow bugfix rebase`
- `gFbc` is short for `git flow bugfix checkout`
- `gFbm` is short for `git flow bugfix pull`
- `gFbx` is short for `git flow bugfix delete`
#### Release
- `gFl` is short for `git flow release`
- `gFll` is short for `git flow release list`
- `gFls` is short for `git flow release start`
- `gFlf` is short for `git flow release finish`
- `gFlp` is short for `git flow release publish`
- `gFlt` is short for `git flow release track`
- `gFld` is short for `git flow release diff`
- `gFlr` is short for `git flow release rebase`
- `gFlc` is short for `git flow release checkout`
- `gFlm` is short for `git flow release pull`
- `gFlx` is short for `git flow release delete`
#### Hotfix
- `gFh` is short for `git flow hotfix`
- `gFhl` is short for `git flow hotfix list`
- `gFhs` is short for `git flow hotfix start`
- `gFhf` is short for `git flow hotfix finish`
- `gFhp` is short for `git flow hotfix publish`
- `gFht` is short for `git flow hotfix track`
- `gFhd` is short for `git flow hotfix diff`
- `gFhr` is short for `git flow hotfix rebase`
- `gFhc` is short for `git flow hotfix checkout`
- `gFhm` is short for `git flow hotfix pull`
- `gFhx` is short for `git flow hotfix delete`
#### Support
- `gFs` is short for `git flow support`
- `gFsl` is short for `git flow support list`
- `gFss` is short for `git flow support start`
- `gFsf` is short for `git flow support finish`
- `gFsp` is short for `git flow support publish`
- `gFst` is short for `git flow support track`
- `gFsd` is short for `git flow support diff`
- `gFsr` is short for `git flow support rebase`
- `gFsc` is short for `git flow support checkout`
- `gFsm` is short for `git flow support pull`
- `gFsx` is short for `git flow support delete`
### Grep
- `gg` displays lines matching a pattern.
- `ggi` displays lines matching a pattern ignoring case.
- `ggl` lists files matching a pattern.
- `ggL` lists files that are not matching a pattern.
- `ggv` displays lines not matching a pattern.
- `ggw` displays lines matching a pattern at word boundary.
### Index
- `gia` adds file contents to the index.
- `giA` adds file contents to the index interactively.
- `giu` adds file contents to the index (updates only known files).
- `gid` displays changes between the index and a named commit (diff).
- `giD` displays changes between the index and a named commit (word diff).
- `gii` temporarily ignore differences in a given file.
- `giI` unignore differences in a given file.
- `gir` resets the current HEAD to the specified state.
- `giR` resets the current index interactively.
- `gix` removes files/directories from the index (recursively).
- `giX` removes files/directories from the index (recursively and forced).
### Log
- `gl` displays the log.
- `gls` displays the stats log.
- `gld` displays the diff log.
- `glo` displays the one line log.
- `glg` displays the graph log.
- `glb` displays the brief commit log.
- `glc` displays the commit count for each contributor in descending order.
- `glS` displays the log and checks the validity of signed commits.
### Merge
- `gm` joins two or more development histories together.
- `gmC` joins two or more development histories together but does not commit.
- `gmF` joins two or more development histories together but does not commit
- `gbs` lists branches and their commits with ancestry graphs.
- `gbS` lists local and remote branches and their commits with ancestry graphs.
- `gbV` lists branches with more verbose information about their commits.
- `gbx` deletes a branch. (also `gbd`)
- `gbX` deletes a branch irrespective of its merged status. (also `gbD`)
### Commit (c)
- `gc` records changes to the repository.
- `gca` stages all modified and deleted files.
- `gcm` records changes to the repository with the given message.
- `gcS` records changes to the repository. (Signed)
- `gcSa` stages all modified and deleted files. (Signed)
- `gcSm` records changes to the repository with the given message. (Signed)
- `gcam` stages all modified and deleted files, and records changes to the
repository with the given message.
- `gco` checks out a branch or paths to work tree.
- `gcO` checks out hunks from the index or the tree interactively.
- `gcf` amends the tip of the current branch using the same log message as
*HEAD*.
- `gcSf` amends the tip of the current branch using the same log message as
*HEAD*. (Signed)
- `gcF` amends the tip of the current branch.
- `gcSF` amends the tip of the current branch. (Signed)
- `gcp` applies changes introduced by existing commits.
- `gcP` applies changes introduced by existing commits without committing.
-`gcr`revertsexisting commits by reverting patches and recording new commits.
- `gcR` removes the *HEAD* commit.
- `gcs` displays various types of objects.
- `gcsS` displays commits with GPG signature.
- `gcl` lists lost commits.
- `gcy` displays commits yet to be applied to upstream in the short format.
- `gcY` displays commits yet to be applied to upstream.
### Conflict (C)
- `gCl` lists unmerged files.
- `gCa` adds unmerged file contents to the index.
- `gCe` executes merge-tool on all unmerged file.
- `gCo` checks out our changes for unmerged paths.
- `gCO` checks out our changes for all unmerged paths.
- `gCt` checks out their changes for unmerged paths.
- `gCT` checks out their changes for all unmerged paths.
### Data (d)
- `gd` displays information about files in the index and the work tree.
- `gdc` lists cached files.
- `gdx` lists deleted files.
- `gdm` lists modified files.
- `gdu` lists untracked files.
- `gdk` lists killed files.
- `gdi` lists ignored files.
### Fetch (f)
- `gf` downloads objects and references from another repository.
- `gfa` downloads objects and references from all remote repositories.
- `gfc` clones a repository into a new directory.
- `gfcr` clones a repository into a new directory including all submodules.
- `gfm` fetches from and merges with another repository or local branch.
- `gfr` fetches from and rebases on another repository or local branch.
### Flow (F)
- `gFi` is short for `git flow init`
#### Feature (Ff)
- `gFf` is short for `git flow feature`
- `gFfl` is short for `git flow feature list`
- `gFfs` is short for `git flow feature start`
- `gFff` is short for `git flow feature finish`
- `gFfp` is short for `git flow feature publish`
- `gFft` is short for `git flow feature track`
- `gFfd` is short for `git flow feature diff`
- `gFfr` is short for `git flow feature rebase`
- `gFfc` is short for `git flow feature checkout`
- `gFfm` is short for `git flow feature pull`
- `gFfx` is short for `git flow feature delete`
#### Bugfix (Fb)
- `gFb` is short for `git flow bugfix`
- `gFbl` is short for `git flow bugfix list`
- `gFbs` is short for `git flow bugfix start`
- `gFbf` is short for `git flow bugfix finish`
- `gFbp` is short for `git flow bugfix publish`
- `gFbt` is short for `git flow bugfix track`
- `gFbd` is short for `git flow bugfix diff`
- `gFbr` is short for `git flow bugfix rebase`
- `gFbc` is short for `git flow bugfix checkout`
- `gFbm` is short for `git flow bugfix pull`
- `gFbx` is short for `git flow bugfix delete`
#### Release (Fl)
- `gFl` is short for `git flow release`
- `gFll` is short for `git flow release list`
- `gFls` is short for `git flow release start`
- `gFlf` is short for `git flow release finish`
- `gFlp` is short for `git flow release publish`
- `gFlt` is short for `git flow release track`
- `gFld` is short for `git flow release diff`
- `gFlr` is short for `git flow release rebase`
- `gFlc` is short for `git flow release checkout`
- `gFlm` is short for `git flow release pull`
- `gFlx` is short for `git flow release delete`
#### Hotfix (Fh)
- `gFh` is short for `git flow hotfix`
- `gFhl` is short for `git flow hotfix list`
- `gFhs` is short for `git flow hotfix start`
- `gFhf` is short for `git flow hotfix finish`
- `gFhp` is short for `git flow hotfix publish`
- `gFht` is short for `git flow hotfix track`
- `gFhd` is short for `git flow hotfix diff`
- `gFhr` is short for `git flow hotfix rebase`
- `gFhc` is short for `git flow hotfix checkout`
- `gFhm` is short for `git flow hotfix pull`
- `gFhx` is short for `git flow hotfix delete`
#### Support (Fs)
- `gFs` is short for `git flow support`
- `gFsl` is short for `git flow support list`
- `gFss` is short for `git flow support start`
- `gFsf` is short for `git flow support finish`
- `gFsp` is short for `git flow support publish`
- `gFst` is short for `git flow support track`
- `gFsd` is short for `git flow support diff`
- `gFsr` is short for `git flow support rebase`
- `gFsc` is short for `git flow support checkout`
- `gFsm` is short for `git flow support pull`
- `gFsx` is short for `git flow support delete`
### Grep (g)
- `gg` displays lines matching a pattern.
- `ggi` displays lines matching a pattern ignoring case.
- `ggl` lists files matching a pattern.
- `ggL` lists files that are not matching a pattern.
- `ggv` displays lines not matching a pattern.
- `ggw` displays lines matching a pattern at word boundary.
### Index (i)
- `gia` adds file contents to the index.
- `giA` adds file contents to the index interactively.
- `giu` adds file contents to the index (updates only known files).
- `gid` displays changes between the index and a named commit (diff).
- `giD` displays changes between the index and a named commit (word diff).
- `gii` temporarily ignore differences in a given file.
- `giI` unignore differences in a given file.
- `gir` resets the current HEAD to the specified state.
- `giR` resets the current index interactively.
- `gix` removes files/directories from the index (recursively).
- `giX` removes files/directories from the index (recursively and forced).
### Log (l)
- `gl` displays the log.
- `gls` displays the stats log.
- `gld` displays the diff log.
- `glo` displays the one line log.
- `glg` displays the graph log.
- `glb` displays the brief commit log.
- `glc` displays the commit count for each contributor in descending order.
- `glS` displays the log and checks the validity of signed commits.
### Merge (m)
- `gm` joins two or more development histories together.
- `gmC` joins two or more development histories together but does not commit.
- `gmF` joins two or more development histories together but does not commit
generating a merge commit even if the merge resolved as a fast-forward.
- `gma` aborts the conflict resolution, and reconstructs the pre-merge state.
- `gmt` runs the merge conflict resolution tools to resolve conflicts.
### Push
- `gp` updates remote refs along with associated objects.
- `gpf` forcefully updates remote refs along with associated objects using the safer `--force-with-lease` option.
- `gpF` forcefully updates remote refs along with associated objects using the riskier `--force` option.
- `gpa` updates remote branches along with associated objects.
- `gpA` updates remote branches and tags along with associated objects.
- `gpt` updates remote tags along with associated objects.
- `gpc` updates remote refs along with associated objects and adds *origin*
as an upstream reference for the current branch.
- `gpp` pulls and pushes from origin to origin.
### Rebase
- `gr` forward-ports local commits to the updated upstream head.
- `gra` aborts the rebase.
- `grc` continues the rebase after merge conflicts are resolved.
- `gri` makes a list of commits to be rebased and opens the editor.
- `grs` skips the current patch.
### Remote
- `gR` manages tracked repositories.
- `gRl` lists remote names and their URLs.
- `gRa` adds a new remote.
- `gRx` removes a remote.
- `gRm` renames a remote.
- `gRu` fetches remotes updates.
- `gRp` prunes all stale remote tracking branches.
- `gRs` displays information about a given remote.
- `gRb` opens a remote on [GitHub][3] in the default browser.
### Stash
- `gs` stashes the changes of the dirty working directory.
- `gsa` applies the changes recorded in a stash to the working directory.
- `gsx` drops a stashed state.
- `gsX` drops all the stashed states.
- `gsl` lists stashed states.
- `gsL` lists dropped stashed states.
- `gsd` displays changes between the stash and its original parent.
- `gsp` removes and applies a single stashed state from the stash list.
- `gsr` recovers a given stashed state.
- `gss` stashes the changes of the dirty working directory, including untracked.
- `gsS` stashes the changes of the dirty working directory interactively.
- `gsw` stashes the changes of the dirty working directory retaining the index.
### Submodule
- `gS` initializes, updates, or inspects submodules.
- `gSa` adds given a repository as a submodule.
- `gSf` evaluates a shell command in each of checked out submodules.
- `gSi` initializes submodules.
- `gSI` initializes and clones submodules recursively.
- `gSl` lists the commits of all submodules.
- `gSm` moves a submodule.
- `gSs` synchronizes submodules' remote URL to the value specified in
.gitmodules.
- `gSu` fetches and merges the latest changes for all submodule.
- `gSx` removes a submodule.
### Tag
- `gt` lists tags or creates tag.
- `gtl` lists tags matching pattern.
- `gts` creates a signed tag.
- `gtv` validate a signed tag.
### Working directory
- `gws` displays working-tree status in the short format.
- `gwS` displays working-tree status.
- `gwd` displays changes between the working tree and the index (diff).
- `gwD` displays changes between the working tree and the index (word diff).
- `gwr` resets the current HEAD to the specified state, does not touch the
- `gma` aborts the conflict resolution, and reconstructs the pre-merge state.
- `gmt` runs the merge conflict resolution tools to resolve conflicts.
### Push (p)
- `gp` updates remote refs along with associated objects.
- `gpf` forcefully updates remote refs along with associated objects using the
safer `--force-with-lease` option.
- `gpF` forcefully updates remote refs along with associated objects using the
riskier `--force` option.
- `gpa` updates remote branches along with associated objects.
- `gpA` updates remote branches and tags along with associated objects.
- `gpt` updates remote tags along with associated objects.
- `gpc` updates remote refs along with associated objects and adds *origin* as
an upstream reference for the current branch.
- `gpp` pulls and pushes from origin to origin.
### Rebase (r)
- `gr` forward-ports local commits to the updated upstream head.
- `gra` aborts the rebase.
- `grc` continues the rebase after merge conflicts are resolved.
- `gri` makes a list of commits to be rebased and opens the editor.
- `grs` skips the current patch.
### Remote (R)
- `gR` manages tracked repositories.
- `gRl` lists remote names and their URLs.
- `gRa` adds a new remote.
- `gRx` removes a remote.
- `gRm` renames a remote.
- `gRu` fetches remotes updates.
- `gRp` prunes all stale remote tracking branches.
- `gRs` displays information about a given remote.
- `gRb` opens a remote on [GitHub][3] in the default browser.
### Stash (s)
- `gs` stashes the changes of the dirty working directory.
- `gsa` applies the changes recorded in a stash to the working directory.
- `gsx` drops a stashed state.
- `gsX` drops all the stashed states.
- `gsl` lists stashed states.
- `gsL` lists dropped stashed states.
- `gsd` displays changes between the stash and its original parent.
- `gsp` removes and applies a single stashed state from the stash list.
- `gsr` recovers a given stashed state.
- `gss` stashes the changes of the dirty working directory, including untracked.
- `gsS` stashes the changes of the dirty working directory interactively.
- `gsw` stashes the changes of the dirty working directory retaining the index.
### Submodule (S)
- `gS` initializes, updates, or inspects submodules.
- `gSa` adds given a repository as a submodule.
- `gSf` evaluates a shell command in each of checked out submodules.
- `gSi` initializes submodules.
- `gSI` initializes and clones submodules recursively.
- `gSl` lists the commits of all submodules.
- `gSm` moves a submodule.
- `gSs` synchronizes submodules' remote URL to the value specified in
*.gitmodules*.
- `gSu` fetches and merges the latest changes for all submodule.
- `gSx` removes a submodule.
### Tag (t)
- `gt` lists tags or creates tag.
- `gtl` lists tags matching pattern.
- `gts` creates a signed tag.
- `gtv` validate a signed tag.
### Working directory (w)
- `gws` displays working-tree status in the short format.
- `gwS` displays working-tree status.
- `gwd` displays changes between the working tree and the index (diff).
- `gwD` displays changes between the working tree and the index (word diff).
- `gwr` resets the current HEAD to the specified state, does not touch the
index nor the working tree.
- `gwR` resets the current HEAD, index and working tree to the specified state.
- `gwc` removes untracked files from the working tree (dry-run).
- `gwC` removes untracked files from the working tree.
- `gwx` removes files from the working tree and from the index recursively.
- `gwX` removes files from the working tree and from the index recursively and
- `gwR` resets the current HEAD, index and working tree to the specified state.
- `gwc` removes untracked files from the working tree (dry-run).
- `gwC` removes untracked files from the working tree.
- `gwx` removes files from the working tree and from the index recursively.
- `gwX` removes files from the working tree and from the index recursively and
forcefully.
### Shadows
The following aliases may shadow system commands:
- `gb` shadows the [GB][9].
- `gm` shadows the [GraphicsMagick image processor][11].
- `gpt` shadows the [GUID partition table maintenance utility][4].
- `gs` shadows the [Ghostscript interpreter and previewer][5].
- `gb` shadows the [GB][9].
- `gm` shadows the [GraphicsMagick image processor][11].
- `gpt` shadows the [GUID partition table maintenance utility][4].
- `gs` shadows the [Ghostscript interpreter and previewer][5].
If you frequently use the above commands, you may wish to remove said aliases
from this module or to disable them at the bottom of the zshrc with `unalias`.
@ -330,25 +329,23 @@ from this module or to disable them at the bottom of the zshrc with `unalias`.
@@ -330,25 +329,23 @@ from this module or to disable them at the bottom of the zshrc with `unalias`.
You can temporarily bypass an alias by prefixing it with a backward slash:
`\gpt`.
Functions
---------
## Functions
- `git-branch-current` displays the current branch.
- `git-commit-lost` lists lost commits.
- `git-dir` displays the path to the Git directory.
- `git-hub-browse` opens the [GitHub][3] repository in the default browser.
@ -435,22 +432,21 @@ Last, add `$git_info[prompt]` to `$PROMPT` and `$git_info[rprompt]` to
@@ -435,22 +432,21 @@ Last, add `$git_info[prompt]` to `$PROMPT` and `$git_info[rprompt]` to
`$RPROMPT` respectively and call `git-info` in the `prompt_name_preexec` hook
function.
Authors
-------
## Authors
*The authors of this module should be contacted via the [issue tracker][6].*
@ -34,38 +31,37 @@ If colors are enabled, *history-substring-search* will automatically highlight
@@ -34,38 +31,37 @@ If colors are enabled, *history-substring-search* will automatically highlight
positive results.
To enable highlighting for this module only, add the following line to
*zpreztorc*:
*~/.zpreztorc*:
```sh
zstyle ':prezto:module:history-substring-search' color 'yes'
```
To set the query found color, add the following line to *zpreztorc*:
To set the query found color, add the following line to *~/.zpreztorc*:
```sh
zstyle ':prezto:module:history-substring-search:color' found ''
```
To set the query not found color, add the following line to *zpreztorc*:
To set the query not found color, add the following line to *~/.zpreztorc*:
Defines Homebrew specific environment variables and aliases.
Variables
---------
## Variables
Execute the following to list the environment variables loaded in the shell:
@ -12,35 +10,34 @@ Execute the following to list the environment variables loaded in the shell:
@@ -12,35 +10,34 @@ Execute the following to list the environment variables loaded in the shell:
brew shellenv
```
Aliases
-------
## Aliases
### Homebrew
### Homebrew Core
- `brewc` cleans outdated brews and their cached archives.
- `brewi` installs a formula.
- `brewL` lists installed formulae that are not dependencies of another installed formula.
- `brewl` lists installed formulae.
- `brewo` lists brews which have an update available.
- `brews` searches for a formula.
- `brewu` upgrades outdated formulae.
- `brewx` uninstalls a formula.
- `brewc` cleans outdated brews and their cached archives.
- `brewi` installs a formula.
- `brewL` lists installed formulae that are not dependencies of another
installed formula.
- `brewl` lists installed formulae.
- `brewo` lists brews which have an update available.
- `brews` searches for a formula.
- `brewu` upgrades outdated formulae.
- `brewx` uninstalls a formula.
### Homebrew Cask
- `caski` installs a cask.
- `caskl` lists installed casks.
- `casko` lists casks which have an update available.
- `casks` searches for a cask.
- `casku` upgrades outdated casks.
- `caskx` uninstalls a cask.
- `caski` installs a cask.
- `caskl` lists installed casks.
- `casko` lists casks which have an update available.
- `casks` searches for a cask.
- `casku` upgrades outdated casks.
- `caskx` uninstalls a cask.
Authors
-------
## Authors
*The authors of this module should be contacted via the [issue tracker][1].*
Provides aliases and functions for the [Pacman][1] package manager and
frontends.
Settings
--------
## Settings
It is possible to use a Pacman frontend with the pacman aliases provided by this
package as long as that frontend supports the same command line options (The
@ -17,53 +15,50 @@ supported by Archlinux. It is currently recommended to manually build AUR
@@ -17,53 +15,50 @@ supported by Archlinux. It is currently recommended to manually build AUR
packages using the [provided instructions][3]. The [aurutils][4] project has a
set of small utilities to make this easier.
To enable a Pacman frontend, add the following line to *zpreztorc*, substituting
`pacman_frontend` with the name of the frontent:
To enable a Pacman frontend, add the following line to *~/.zpreztorc*,
substituting *pacman_frontend* with the name of the frontend:
To ensure that your function works with the editor-info module you'll need to
set the following variable:
set the following variable in *~/.zpreztorc*:
```
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
```sh
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
```
This is to ensure compatibility with outside prompts, while allowing prezto
@ -134,7 +131,8 @@ When calling functions to get information to display in a prompt, do not assume
@@ -134,7 +131,8 @@ When calling functions to get information to display in a prompt, do not assume
that all the dependencies have been loaded. Always check for the availability of
a function before you calling it.
**Do not register hook functions. They will be registered by the `prompt` function.**
**Do not register hook functions. They will be automatically registered by the
`prompt` function.**
The most basic example of this function can be seen below.
@ -146,10 +144,9 @@ function prompt_name_precmd {
@@ -146,10 +144,9 @@ function prompt_name_precmd {
}
```
Troubleshooting
---------------
## Troubleshooting
### Fonts aren't displaying properly.
### Fonts aren't displaying properly
On most systems, themes which use special characters need to have a patched font
installed and configured properly.
@ -157,16 +154,14 @@ installed and configured properly.
@@ -157,16 +154,14 @@ installed and configured properly.
Powerline provides some information on [terminal support][4] and [how to install
patched fonts][5] which should fix most font issues.
Authors
-------
## Authors
*The authors of this module should be contacted via the [issue tracker][3].*
- `python-info` exposes information about the Python environment via the
- `python-info` exposes information about the Python environment via the
`$python_info` associative array.
Theming
-------
## Theming
To display the name of the current virtual enviroment in a prompt, define the
To display the name of the current virtual environment in a prompt, define the
following style in the `prompt_name_setup` function.
# %v - virtualenv name.
zstyle ':prezto:module:python:info:virtualenv' format 'virtualenv:%v'
```sh
# %v - virtualenv name.
zstyle ':prezto:module:python:info:virtualenv' format 'virtualenv:%v'
```
Then add `$python_info[virtualenv]` to `$PROMPT` or `$RPROMPT` and call
`python-info` in the `prompt_name_preexec` hook function.
@ -148,17 +142,16 @@ Similarly, you can use `:prezto:module:python:info:version:format` with `%v` for
@@ -148,17 +142,16 @@ Similarly, you can use `:prezto:module:python:info:version:format` with `%v` for
the version and add `$python_info[version]` to your prompt for the current
python version/
Authors
-------
## Authors
*The authors of this module should be contacted via the [issue tracker][5].*
Provides for easier use of 256 colors and effects.
To learn more about text formatting, read [A Guide to 256 Color Codes][1].
Variables
---------
## Variables
- `BG` provides background colors.
- `FG` provides foreground colors.
- `FX` provides effects.
- `BG` provides background colors.
- `FG` provides foreground colors.
- `FX` provides effects.
### Background and Foreground
@ -79,13 +77,12 @@ Though there are many effects, most terminals support at least bold formatting.
@@ -79,13 +77,12 @@ Though there are many effects, most terminals support at least bold formatting.
Use `$BG[none]`, `$FG[none]`, or `$FX[none]` to turn off formatting.
Authors
-------
## Authors
*The authors of this module should be contacted via the [issue tracker][2].*
Integrates [zsh-syntax-highlighting][1] into Prezto.
@ -12,20 +11,18 @@ Additionally, if this module is used in conjunction with the
@@ -12,20 +11,18 @@ Additionally, if this module is used in conjunction with the
To elaborate: The relative order of loading the modules would be
'syntax-highlighting', 'history-substring-search' and 'prompt'.
Contributors
------------
## Contributors
New features and bug fixes should be submitted to the
[zsh-syntax-highlighting][1] project according to its rules and regulations.
This module will be synchronized against it.
Settings
--------
## Settings
### Highlighting
To enable highlighting for this module only, add the following line to
*zpreztorc*:
*~/.zpreztorc*:
```sh
zstyle ':prezto:module:syntax-highlighting' color 'yes'
@ -36,7 +33,7 @@ zstyle ':prezto:module:syntax-highlighting' color 'yes'
@@ -36,7 +33,7 @@ zstyle ':prezto:module:syntax-highlighting' color 'yes'
Syntax highlighting is accomplished by pluggable [highlighters][2]. This module
only enables the *main* highlighter by default.
To enable all highlighters, add the following to *zpreztorc*:
To enable all highlighters, add the following to *~/.zpreztorc*:
This module provides a wrapper around the [wakeonlan][1] tool.
Usage
-----
## Usage
To use this wrapper, create the *~/.wakeonlan* directory, and place in it one
To use this wrapper, create the *`~/.wakeonlan`* directory, and place in it one
file for each device you would like to be able to wake. Give the file a name
that describes the device, such as its hostname.
Each file should contain a line with the MAC address of the target device and
the network broadcast address. For instance, there might be a file
*~/.wakeonlan/leto* with the following contents:
`*~/.wakeonlan/leto`* with the following contents:
```conf
00:11:22:33:44:55:66 192.168.0.255
@ -20,21 +18,20 @@ the network broadcast address. For instance, there might be a file
@@ -20,21 +18,20 @@ the network broadcast address. For instance, there might be a file
To wake that device, use the following command:
```sh
$ wake leto
```console
wake leto
```
For more information on the configuration file format, read the
[wakeonlan man page][2].
Authors
-------
## Authors
*The authors of this module should be contacted via [issue tracker][3].*
Zsh has several system-wide and user-local configuration files.
Prezto has one user-local configuration file.
System-wide configuration files are installation-dependent but are installed
in */etc* by default.
in *`/etc`* by default.
User-local configuration files have the same name as their global counterparts
but are prefixed with a dot (hidden). Zsh looks for these files in the path
stored in the `$ZDOTDIR` environment variable. However, if said variable is
not defined, Zsh will use the user's home directory.
File Descriptions
-----------------
## File Descriptions
The configuration files are read in the following order:
01. /etc/zshenv
02. ~/.zshenv
03. /etc/zprofile
04. ~/.zprofile
05. /etc/zshrc
06. ~/.zshrc
07. ~/.zpreztorc
08. /etc/zlogin
09. ~/.zlogin
10. ~/.zlogout
11. /etc/zlogout
01. */etc/zshenv*
02. *~/.zshenv*
03. */etc/zprofile*
04. *~/.zprofile*
05. */etc/zshrc*
06. *~/.zshrc*
07. *~/.zpreztorc*
08. */etc/zlogin*
09. *~/.zlogin*
10. *~/.zlogout*
11. */etc/zlogout*
### zshenv
@ -37,16 +35,16 @@ small as possible and should only define environment variables.
@@ -37,16 +35,16 @@ small as possible and should only define environment variables.
### zprofile
This file is similar to zlogin, but it is sourced before zshrc. It was added
for [KornShell][1] fans. See the description of zlogin below for what it may
This file is similar to *zlogin*, but it is sourced before *zshrc*. It was added
for [KornShell][1] fans. See the description of *zlogin* below for what it may
contain.
zprofile and zlogin are not meant to be used concurrently but can be done so.
*zprofile* and *zlogin* are not meant to be used together but can be done so.
### zshrc
This file is sourced by interactive shells. It should define aliases,
functions, shell options, and key bindings.
This file is sourced by interactive shells. It should define aliases, functions,
shell options, and key bindings.
### zpreztorc
@ -54,9 +52,9 @@ This file configures Prezto.
@@ -54,9 +52,9 @@ This file configures Prezto.
### zlogin
This file is sourced by login shells after zshrc, and thus, it should contain
This file is sourced by login shells after *zshrc*. Thus, it should contain
commands that need to execute at login. It is usually used for messages such as
[fortune][2], [msgs][3], or for the creation of files.
[*fortune*][2], [*msgs*][3], or for the creation of files.
This is not the file to define aliases, functions, shell options, and key
bindings. It should not change the shell environment.
@ -64,16 +62,15 @@ bindings. It should not change the shell environment.
@@ -64,16 +62,15 @@ bindings. It should not change the shell environment.
### zlogout
This file is sourced by login shells during logout. It should be used for
displaying messages and the deletion of files.
displaying messages and for deletion of files.
Authors
-------
## Authors
*The authors of these files should be contacted via the [issue tracker][4].*