mirror of
https://github.com/dcarrillo/prezto.git
synced 2026-04-18 13:24:04 +00:00
Merge upstream/master
This commit is contained in:
@@ -318,11 +318,20 @@ zstyle ':prezto:module:git:alias' skip 'yes'
|
||||
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.
|
||||
- `gwC` removes untracked files and directories 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.
|
||||
|
||||
### Working tree (W)
|
||||
|
||||
- `gWa` adds a new working tree.
|
||||
- `gWl` lists all working trees.
|
||||
- `gWx` removes a working tree.
|
||||
- `gWX` removes a working tree forcefully.
|
||||
- `gWm` moves a working tree to a new location.
|
||||
- `gWc` prunes stale worktrees and their administrative data.
|
||||
|
||||
### Shadows
|
||||
|
||||
The following aliases may shadow system commands:
|
||||
|
||||
@@ -192,7 +192,7 @@ if ! zstyle -t ':prezto:module:git:alias' skip; then
|
||||
alias glg='git log --topo-order --graph --pretty=format:"$_git_log_oneline_format"'
|
||||
alias glb='git log --topo-order --pretty=format:"$_git_log_brief_format"'
|
||||
alias glc='git shortlog --summary --numbered'
|
||||
alias glS='git log --show-signature'
|
||||
alias glS='git log --topo-order --show-signature --pretty=format:"${_git_log_medium_format}"'
|
||||
|
||||
# Merge (m)
|
||||
alias gm='git merge'
|
||||
@@ -269,7 +269,15 @@ if ! zstyle -t ':prezto:module:git:alias' skip; then
|
||||
alias gwr='git reset --soft'
|
||||
alias gwR='git reset --hard'
|
||||
alias gwc='git clean --dry-run'
|
||||
alias gwC='git clean --force'
|
||||
alias gwC='git clean -d --force'
|
||||
alias gwx='git rm -r'
|
||||
alias gwX='git rm -r --force'
|
||||
|
||||
# Worktree management (W)
|
||||
alias gWa='git worktree add'
|
||||
alias gWl='git worktree list'
|
||||
alias gWx='git worktree remove'
|
||||
alias gWX='git worktree remove --force'
|
||||
alias gWm='git worktree move'
|
||||
alias gWc='git worktree prune'
|
||||
fi
|
||||
|
||||
@@ -246,7 +246,7 @@ function git-info {
|
||||
fi
|
||||
|
||||
# Get the branch.
|
||||
branch="${$(command git symbolic-ref HEAD 2> /dev/null)#refs/heads/}"
|
||||
branch="$(escape-eval "${$(command git symbolic-ref HEAD 2> /dev/null)#refs/heads/}")"
|
||||
|
||||
# Format branch.
|
||||
zstyle -s ':prezto:module:git:info:branch' format 'branch_format'
|
||||
@@ -257,7 +257,7 @@ function git-info {
|
||||
# Format position.
|
||||
zstyle -s ':prezto:module:git:info:position' format 'position_format'
|
||||
if [[ -z "$branch" && -n "$position_format" ]]; then
|
||||
position="$(command git describe --contains --all HEAD 2> /dev/null)"
|
||||
position="$(escape-eval "$(command git describe --contains --all HEAD 2> /dev/null)")"
|
||||
if [[ -n "$position" ]]; then
|
||||
zformat -f position_formatted "$position_format" "p:$position"
|
||||
fi
|
||||
@@ -268,7 +268,7 @@ function git-info {
|
||||
if [[ -n "$branch" && -n "$remote_format" ]]; then
|
||||
# Gets the remote name.
|
||||
remote_cmd='command git rev-parse --symbolic-full-name --verify HEAD@{upstream}'
|
||||
remote="${$(${(z)remote_cmd} 2> /dev/null)##refs/remotes/}"
|
||||
remote="$(escape-eval "${$(${(z)remote_cmd} 2> /dev/null)##refs/remotes/}")"
|
||||
if [[ -n "$remote" ]]; then
|
||||
zformat -f remote_formatted "$remote_format" "R:$remote"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user