Update module README.md
This commit is contained in:
parent
539f8ae8df
commit
b7cb8d81c0
3 changed files with 157 additions and 161 deletions
|
@ -1,4 +1,4 @@
|
||||||
Git-info
|
git-info
|
||||||
========
|
========
|
||||||
|
|
||||||
Exposes git repository status information to prompts.
|
Exposes git repository status information to prompts.
|
||||||
|
@ -15,8 +15,8 @@ Settings
|
||||||
### Ignore Submodules
|
### Ignore Submodules
|
||||||
|
|
||||||
Retrieving the status of a repository with submodules can take a long time.
|
Retrieving the status of a repository with submodules can take a long time.
|
||||||
Submodules may be ignored when 'none', 'untracked', 'dirty', or 'all', which is
|
So by default 'all' submodules are ignored. Optionally, 'untracked', 'dirty', or
|
||||||
the default.
|
'none' submodules can be ignored:
|
||||||
|
|
||||||
zstyle ':zim:git-info' ignore-submodules 'none'
|
zstyle ':zim:git-info' ignore-submodules 'none'
|
||||||
|
|
||||||
|
@ -25,11 +25,11 @@ the default.
|
||||||
Verbose mode uses `git status` and computes the count of indexed, unindexed and
|
Verbose mode uses `git status` and computes the count of indexed, unindexed and
|
||||||
also untracked files. It can be enabled with the following zstyle:
|
also untracked files. It can be enabled with the following zstyle:
|
||||||
|
|
||||||
zstyle ':zim:git-info' verbose 'yes'
|
zstyle ':zim:git-info' verbose yes
|
||||||
|
|
||||||
In non-verbose mode, the 'untracked' context is not available (see Main
|
In non-verbose mode, the 'untracked' context is not available (see Main
|
||||||
Contexts below), and untracked files are also not considered for computing the
|
Contexts below), and untracked files are also not considered for computing the
|
||||||
'dirty' context. Using `git status` or checking for untracked files can be
|
'dirty' context. Using `git status` to check for untracked files can be
|
||||||
[expensive](https://gist.github.com/sindresorhus/3898739).
|
[expensive](https://gist.github.com/sindresorhus/3898739).
|
||||||
|
|
||||||
Theming
|
Theming
|
||||||
|
@ -99,6 +99,5 @@ Second, format how the above attributes are displayed in prompts:
|
||||||
'prompt' 'git(%b%c)' \
|
'prompt' 'git(%b%c)' \
|
||||||
'rprompt' '[%R]'
|
'rprompt' '[%R]'
|
||||||
|
|
||||||
Last, add `$git_info[prompt]` to `$PROMPT` and `$git_info[rprompt]` to
|
Last, add `${git_info[prompt]}` to `PS1` and `${git_info[rprompt]}` to `RPS1`
|
||||||
`$RPROMPT` respectively and call `git-info` in the `prompt_name_precmd` hook
|
respectively and call `git-info` in the `prompt_name_precmd` hook function.
|
||||||
function.
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Git
|
git
|
||||||
===
|
===
|
||||||
|
|
||||||
Provides nice git aliases and functions.
|
Provides nice git aliases and functions.
|
||||||
|
@ -11,202 +11,202 @@ Aliases
|
||||||
|
|
||||||
### Git
|
### Git
|
||||||
|
|
||||||
- `g` is short for `git`.
|
* `g` is short for `git`.
|
||||||
|
|
||||||
### Branch
|
### Branch
|
||||||
|
|
||||||
- `gb` lists, creates, renames, and deletes branches.
|
* `gb` lists, creates, renames, and deletes branches.
|
||||||
- `gbc` creates a new branch.
|
* `gbc` creates a new branch.
|
||||||
- `gbl` lists branches and their commits.
|
* `gbl` lists branches and their commits.
|
||||||
- `gbL` lists local and remote branches and their commits.
|
* `gbL` lists local and remote branches and their commits.
|
||||||
- `gbm` renames a branch.
|
* `gbm` renames a branch.
|
||||||
- `gbM` renames a branch even if the new branch name already exists.
|
* `gbM` renames a branch even if the new branch name already exists.
|
||||||
- `gbs` lists branches and their commits with ancestry graphs.
|
* `gbs` lists branches and their commits with ancestry graphs.
|
||||||
- `gbS` lists local and remote branches and their commits with ancestry
|
* `gbS` lists local and remote branches and their commits with ancestry
|
||||||
graphs.
|
graphs.
|
||||||
- `gbx` deletes a branch.
|
* `gbx` deletes a branch.
|
||||||
- `gbX` deletes a branch irrespective of its merged status.
|
* `gbX` deletes a branch irrespective of its merged status.
|
||||||
|
|
||||||
### Commit
|
### Commit
|
||||||
|
|
||||||
- `gc` records changes to the repository.
|
* `gc` records changes to the repository.
|
||||||
- `gca` commits all modified and deleted files.
|
* `gca` commits all modified and deleted files.
|
||||||
- `gcm` commits with the given message.
|
* `gcm` commits with the given message.
|
||||||
- `gco` checks out a branch or paths to the working tree.
|
* `gco` checks out a branch or paths to the working tree.
|
||||||
- `gcO` checks out hunks from the index or the tree interactively.
|
* `gcO` checks out hunks from the index or the tree interactively.
|
||||||
- `gcf` amends the tip of the current branch reusing the same log message as
|
* `gcf` amends the tip of the current branch reusing the same log message as
|
||||||
*HEAD*.
|
*HEAD*.
|
||||||
- `gcF` amends the tip of the current branch.
|
* `gcF` amends the tip of the current branch.
|
||||||
- `gcp` applies changes introduced by existing commits.
|
* `gcp` applies changes introduced by existing commits.
|
||||||
- `gcP` applies changes introduced by existing commits without committing.
|
* `gcP` applies changes introduced by existing commits without committing.
|
||||||
- `gcr` reverts existing commits by reverting patches and recording new
|
* `gcr` reverts existing commits by reverting patches and recording new
|
||||||
commits.
|
commits.
|
||||||
- `gcR` removes the *HEAD* commit.
|
* `gcR` removes the *HEAD* commit.
|
||||||
- `gcs` shows one or more objects (blobs, trees, tags and commits).
|
* `gcs` shows one or more objects (blobs, trees, tags and commits).
|
||||||
- `gcS` commits with GPG signature.
|
* `gcS` commits with GPG signature.
|
||||||
- `gcv` verifies the GPG signature of commits.
|
* `gcv` verifies the GPG signature of commits.
|
||||||
|
|
||||||
### Conflict
|
### Conflict
|
||||||
|
|
||||||
- `gCl` lists unmerged files.
|
* `gCl` lists unmerged files.
|
||||||
- `gCa` adds unmerged file contents to the index.
|
* `gCa` adds unmerged file contents to the index.
|
||||||
- `gCe` executes merge-tool on all unmerged files.
|
* `gCe` executes merge-tool on all unmerged files.
|
||||||
- `gCo` checks out our changes for unmerged paths.
|
* `gCo` checks out our changes for unmerged paths.
|
||||||
- `gCO` checks out our changes for all 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 unmerged paths.
|
||||||
- `gCT` checks out their changes for all unmerged paths.
|
* `gCT` checks out their changes for all unmerged paths.
|
||||||
|
|
||||||
### Data
|
### Data
|
||||||
|
|
||||||
- `gd` displays information about files in the index and the work tree.
|
* `gd` displays information about files in the index and the work tree.
|
||||||
- `gdc` lists cached files.
|
* `gdc` lists cached files.
|
||||||
- `gdx` lists deleted files.
|
* `gdx` lists deleted files.
|
||||||
- `gdm` lists modified files.
|
* `gdm` lists modified files.
|
||||||
- `gdu` lists untracked files.
|
* `gdu` lists untracked files.
|
||||||
- `gdk` lists killed files.
|
* `gdk` lists killed files.
|
||||||
- `gdi` lists ignored files.
|
* `gdi` lists ignored files.
|
||||||
|
|
||||||
### Fetch
|
### Fetch
|
||||||
|
|
||||||
- `gf` downloads objects and references from another repository.
|
* `gf` downloads objects and references from another repository.
|
||||||
- `gfc` clones a repository into a new directory.
|
* `gfc` clones a repository into a new directory.
|
||||||
- `gfm` fetches from and merges with another repository or local branch.
|
* `gfm` fetches from and merges with another repository or local branch.
|
||||||
- `gfr` fetches from and rebases on another repository or local branch.
|
* `gfr` fetches from and rebases on another repository or local branch.
|
||||||
|
|
||||||
### Grep
|
### Grep
|
||||||
|
|
||||||
- `gg` displays lines matching a pattern.
|
* `gg` displays lines matching a pattern.
|
||||||
- `ggi` displays lines matching a pattern ignoring case.
|
* `ggi` displays lines matching a pattern ignoring case.
|
||||||
- `ggl` lists files matching a pattern.
|
* `ggl` lists files matching a pattern.
|
||||||
- `ggL` lists files that are not matching a pattern.
|
* `ggL` lists files that are not matching a pattern.
|
||||||
- `ggv` displays lines not matching a pattern.
|
* `ggv` displays lines not matching a pattern.
|
||||||
- `ggw` displays lines matching a pattern at word boundary.
|
* `ggw` displays lines matching a pattern at word boundary.
|
||||||
|
|
||||||
### Index
|
### Index
|
||||||
|
|
||||||
- `gia` adds file contents to the index.
|
* `gia` adds file contents to the index.
|
||||||
- `giA` adds file contents to the index interactively.
|
* `giA` adds file contents to the index interactively.
|
||||||
- `giu` adds file contents to the index (updates only known files).
|
* `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 (diff).
|
||||||
- `giD` displays changes between the index and a named commit (word diff).
|
* `giD` displays changes between the index and a named commit (word diff).
|
||||||
- `gir` resets the current *HEAD* to the specified state.
|
* `gir` resets the current *HEAD* to the specified state.
|
||||||
- `giR` resets the current index interactively.
|
* `giR` resets the current index interactively.
|
||||||
- `gix` removes files/directories from the index (recursively).
|
* `gix` removes files/directories from the index (recursively).
|
||||||
- `giX` removes files/directories from the index (recursively and forced).
|
* `giX` removes files/directories from the index (recursively and forced).
|
||||||
|
|
||||||
### Log
|
### Log
|
||||||
|
|
||||||
- `gl` displays the log.
|
* `gl` displays the log.
|
||||||
- `gls` displays the stats log.
|
* `gls` displays the stats log.
|
||||||
- `gld` displays the diff log.
|
* `gld` displays the diff log.
|
||||||
- `glo` displays the one line log.
|
* `glo` displays the one line log.
|
||||||
- `glO` displays the one line log with authors and dates.
|
* `glO` displays the one line log with authors and dates.
|
||||||
- `glg` displays the graph log.
|
* `glg` displays the graph log.
|
||||||
- `glG` displays the graph log with authors and dates.
|
* `glG` displays the graph log with authors and dates.
|
||||||
- `glv` displays the log verifying the GPG signature of commits.
|
* `glv` displays the log verifying the GPG signature of commits.
|
||||||
- `glc` displays the commit count for each contributor in descending order.
|
* `glc` displays the commit count for each contributor in descending order.
|
||||||
|
|
||||||
### Merge
|
### Merge
|
||||||
|
|
||||||
- `gm` joins two or more development histories together.
|
* `gm` joins two or more development histories together.
|
||||||
- `gmC` performs the merge but does not commit.
|
* `gmC` performs the merge but does not commit.
|
||||||
- `gmF` performs the merge generating a commit even if the merge resolved as a
|
* `gmF` performs the merge generating a commit even if the merge resolved as a
|
||||||
fast-forward.
|
fast-forward.
|
||||||
- `gma` aborts the conflict resolution, and reconstructs the pre-merge state.
|
* `gma` aborts the conflict resolution, and reconstructs the pre-merge state.
|
||||||
- `gmt` runs the merge conflict resolution tools to resolve conflicts.
|
* `gmt` runs the merge conflict resolution tools to resolve conflicts.
|
||||||
|
|
||||||
### Push
|
### Push
|
||||||
|
|
||||||
- `gp` updates remote refs along with associated objects.
|
* `gp` updates remote refs along with associated objects.
|
||||||
- `gpf` forces a push.
|
* `gpf` forces a push.
|
||||||
- `gpa` pushes all branches.
|
* `gpa` pushes all branches.
|
||||||
- `gpA` pushes all branches and tags.
|
* `gpA` pushes all branches and tags.
|
||||||
- `gpt` pushes all tags.
|
* `gpt` pushes all tags.
|
||||||
- `gpc` pushes the current branch and adds *origin* as an upstream reference
|
* `gpc` pushes the current branch and adds *origin* as an upstream reference
|
||||||
for it.
|
for it.
|
||||||
- `gpp` pulls and pushes the current branch from *origin* to *origin*.
|
* `gpp` pulls and pushes the current branch from *origin* to *origin*.
|
||||||
|
|
||||||
### Rebase
|
### Rebase
|
||||||
|
|
||||||
- `gr` forward-ports local commits to the updated upstream head.
|
* `gr` forward-ports local commits to the updated upstream head.
|
||||||
- `gra` aborts the rebase.
|
* `gra` aborts the rebase.
|
||||||
- `grc` continues the rebase after merge conflicts are resolved.
|
* `grc` continues the rebase after merge conflicts are resolved.
|
||||||
- `gri` makes a list of commits to be rebased and opens the editor.
|
* `gri` makes a list of commits to be rebased and opens the editor.
|
||||||
- `grs` skips the current patch.
|
* `grs` skips the current patch.
|
||||||
|
|
||||||
### Remote
|
### Remote
|
||||||
|
|
||||||
- `gR` manages tracked repositories.
|
* `gR` manages tracked repositories.
|
||||||
- `gRl` lists remote names and their URLs.
|
* `gRl` lists remote names and their URLs.
|
||||||
- `gRa` adds a new remote.
|
* `gRa` adds a new remote.
|
||||||
- `gRx` removes a remote.
|
* `gRx` removes a remote.
|
||||||
- `gRm` renames a remote.
|
* `gRm` renames a remote.
|
||||||
- `gRu` fetches remotes updates.
|
* `gRu` fetches remotes updates.
|
||||||
- `gRp` prunes all stale remote tracking branches.
|
* `gRp` prunes all stale remote tracking branches.
|
||||||
- `gRs` shows information about a given remote.
|
* `gRs` shows information about a given remote.
|
||||||
|
|
||||||
### Stash
|
### Stash
|
||||||
|
|
||||||
- `gs` stashes the changes of the dirty working directory.
|
* `gs` stashes the changes of the dirty working directory.
|
||||||
- `gsa` applies the changes recorded in a stash to the working directory.
|
* `gsa` applies the changes recorded in a stash to the working directory.
|
||||||
- `gsx` drops a stashed state.
|
* `gsx` drops a stashed state.
|
||||||
- `gsX` drops all the stashed states.
|
* `gsX` drops all the stashed states.
|
||||||
- `gsl` lists stashed states.
|
* `gsl` lists stashed states.
|
||||||
- `gsd` displays changes between the stash and its original parent.
|
* `gsd` displays changes between the stash and its original parent.
|
||||||
- `gsp` removes and applies a single stashed state from the stash list.
|
* `gsp` removes and applies a single stashed state from the stash list.
|
||||||
- `gsr` recovers a given stashed state.
|
* `gsr` recovers a given stashed state.
|
||||||
- `gss` stashes the working directory changes, including untracked files.
|
* `gss` stashes the working directory changes, including untracked files.
|
||||||
- `gsS` stashes the working directory changes interactively.
|
* `gsS` stashes the working directory changes interactively.
|
||||||
- `gsw` stashes the working directory changes retaining the index.
|
* `gsw` stashes the working directory changes retaining the index.
|
||||||
- `gsu` unapplies (reverts) applied changes.
|
* `gsu` unapplies (reverts) applied changes.
|
||||||
|
|
||||||
### Submodule
|
### Submodule
|
||||||
|
|
||||||
- `gS` initializes, updates, or inspects submodules.
|
* `gS` initializes, updates, or inspects submodules.
|
||||||
- `gSa` adds given a repository as a submodule.
|
* `gSa` adds given a repository as a submodule.
|
||||||
- `gSf` evaluates a shell command in each of checked out submodules.
|
* `gSf` evaluates a shell command in each of checked out submodules.
|
||||||
- `gSi` initializes submodules.
|
* `gSi` initializes submodules.
|
||||||
- `gSI` initializes and clones submodules recursively.
|
* `gSI` initializes and clones submodules recursively.
|
||||||
- `gSl` lists the commits of all submodules.
|
* `gSl` lists the commits of all submodules.
|
||||||
- `gSm` moves a submodule.
|
* `gSm` moves a submodule.
|
||||||
- `gSs` synchronizes submodules' remote URL to the value specified in
|
* `gSs` synchronizes submodules' remote URL to the value specified in
|
||||||
.gitmodules.
|
.gitmodules.
|
||||||
- `gSu` fetches and merges the latest changes for all submodules.
|
* `gSu` fetches and merges the latest changes for all submodules.
|
||||||
- `gSx` removes a submodule.
|
* `gSx` removes a submodule.
|
||||||
|
|
||||||
### Tag
|
### Tag
|
||||||
|
|
||||||
- `gt` creates, lists, deletes or verifies a tag object signed with GPG.
|
* `gt` creates, lists, deletes or verifies a tag object signed with GPG.
|
||||||
- `gts` creates a GPG-signed tag.
|
* `gts` creates a GPG-signed tag.
|
||||||
- `gtv` verifies the GPG signature of tags.
|
* `gtv` verifies the GPG signature of tags.
|
||||||
- `gtx` deletes tags with given names.
|
* `gtx` deletes tags with given names.
|
||||||
|
|
||||||
### Working tree
|
### Working tree
|
||||||
|
|
||||||
- `gws` displays working-tree status in the short format.
|
* `gws` displays working-tree status in the short format.
|
||||||
- `gwS` displays working-tree status.
|
* `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 (diff).
|
||||||
- `gwD` displays changes between the working tree and the index (word 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
|
* `gwr` resets the current *HEAD* to the specified state, does not touch the
|
||||||
index nor the working tree.
|
index nor the working tree.
|
||||||
- `gwR` resets the current *HEAD*, index and working tree to the specified
|
* `gwR` resets the current *HEAD*, index and working tree to the specified
|
||||||
state.
|
state.
|
||||||
- `gwc` cleans untracked files from the working tree (dry-run).
|
* `gwc` cleans untracked files from the working tree (dry-run).
|
||||||
- `gwC` cleans untracked files from the working tree.
|
* `gwC` cleans 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.
|
||||||
- `gwX` removes files from the working tree and from the index recursively and
|
* `gwX` removes files from the working tree and from the index recursively and
|
||||||
forcefully.
|
forcefully.
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
|
|
||||||
- `g..` changes the current directory to the top level of the working tree.
|
* `g..` changes the current directory to the top level of the working tree.
|
||||||
|
|
||||||
### Shadows
|
### Shadows
|
||||||
|
|
||||||
The following aliases may shadow system commands:
|
The following aliases may shadow system commands:
|
||||||
|
|
||||||
- `gpt` shadows the GUID partition table maintenance utility.
|
* `gpt` shadows the GUID partition table maintenance utility.
|
||||||
- `gs` shadows Ghostscript.
|
* `gs` shadows Ghostscript.
|
||||||
|
|
||||||
If you frequently use the above commands, you may wish to remove said aliases
|
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`.
|
from this module or to disable them at the bottom of the zshrc with `unalias`.
|
||||||
|
@ -217,11 +217,11 @@ You can temporarily bypass an alias by prefixing it with a backward slash:
|
||||||
Functions
|
Functions
|
||||||
---------
|
---------
|
||||||
|
|
||||||
- `git-branch-current` displays the current branch.
|
* `git-branch-current` displays the current branch.
|
||||||
- `git-dir` displays the path to the Git directory.
|
* `git-dir` displays the path to the Git directory.
|
||||||
- `git-ignore-add` adds any arguments to the .gitignore in the project root.
|
* `git-ignore-add` adds any arguments to the .gitignore in the project root.
|
||||||
- `git-root` displays the path to the working tree root.
|
* `git-root` displays the path to the working tree root.
|
||||||
- `git-stash-clear-interactive` asks for confirmation before clearing the stash.
|
* `git-stash-clear-interactive` asks for confirmation before clearing the stash.
|
||||||
- `git-stash-recover` recovers given dropped stashed states.
|
* `git-stash-recover` recovers given dropped stashed states.
|
||||||
- `git-submodule-move` moves a submodule.
|
* `git-submodule-move` moves a submodule.
|
||||||
- `git-submodule-remove` removes a submodule.
|
* `git-submodule-remove` removes a submodule.
|
||||||
|
|
|
@ -1,22 +1,19 @@
|
||||||
History-Substring-Search
|
history-substring-search
|
||||||
========================
|
========================
|
||||||
|
|
||||||
Allows for fish shell-like searching of history with UP and DOWN.
|
Allows for fish-like searching of history with UP and DOWN.
|
||||||
|
|
||||||
![example][fish_shell]
|
![example][example]
|
||||||
|
|
||||||
This module requires the [input](https://github.com/zimfw/zimfw/blob/master/modules/input/README.md) module. Without it, you may experience odd behavior.
|
If you use
|
||||||
Put 'input' in the first line and 'history-substring-search' on the second line of `zmodules` in your `.zimrc`.
|
[syntax-highlighting](https://github.com/zimfw/zimfw/tree/master/modules/syntax-highlighting),
|
||||||
|
make sure you place 'syntax-highlighting' before 'history-substring-search' on
|
||||||
Additionally, if you use [syntax-highlighting](https://github.com/zimfw/zimfw/blob/master/modules/syntax-highlighting/README.md), place 'syntax-highlighting' before 'history-substring-search' on the second line of `zmodules` in your `.zimrc`.
|
the second line of `zmodules` in your `.zimrc`.
|
||||||
|
|
||||||
The options set explicitly by init.zsh are the default options, and are only set for consistancy.
|
|
||||||
|
|
||||||
Functionality is sourced from [history-substring-search](https://github.com/zsh-users/zsh-history-substring-search)
|
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Contributions should be submitted [upstream to history-substring-search](https://github.com/zsh-users/zsh-history-substring-search)
|
Contributions should be submitted [upstream to
|
||||||
|
zsh-history-substring-search](https://github.com/zsh-users/zsh-history-substring-search).
|
||||||
|
|
||||||
[fish_shell]: https://i.eriner.me/zim_history-substring-search.gif
|
[example]: https://i.eriner.me/zim_history-substring-search.gif
|
||||||
|
|
Loading…
Reference in a new issue