mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-10-20 04:12:06 +08:00
Compare commits
3
Commits
106f9874a2
...
083c339e06
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
083c339e06 | ||
|
|
417c814e2e | ||
|
|
7d34868725 |
@@ -191,6 +191,7 @@ plugins=(... git)
|
||||
| `grmc` | `git rm --cached` |
|
||||
| `gcount` | `git shortlog --summary -n` |
|
||||
| `gsh` | `git show` |
|
||||
| `gshs` | `git show --stat` |
|
||||
| `gsps` | `git show --pretty=short --show-signature` |
|
||||
| `gstall` | `git stash --all` |
|
||||
| `gstu` | `git stash --include-untracked` |
|
||||
|
||||
@@ -392,6 +392,7 @@ alias grm='git rm'
|
||||
alias grmc='git rm --cached'
|
||||
alias gcount='git shortlog --summary --numbered'
|
||||
alias gsh='git show'
|
||||
alias gshs='git show --stat'
|
||||
alias gsps='git show --pretty=short --show-signature'
|
||||
alias gstall='git stash --all'
|
||||
alias gstaa='git stash apply'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
if (( $+commands[mise] )); then
|
||||
_mise_bin=mise
|
||||
_mise_bin=$commands[mise]
|
||||
elif [[ -x ~/.local/bin/mise ]]; then
|
||||
_mise_bin=~/.local/bin/mise
|
||||
else
|
||||
@@ -8,7 +8,6 @@ fi
|
||||
|
||||
# Load mise hooks
|
||||
eval "$($_mise_bin activate zsh)"
|
||||
unset _mise_bin
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `mise`. Otherwise, compinit will have already done that.
|
||||
@@ -18,9 +17,13 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_mise" ]]; then
|
||||
_comps[mise]=_mise
|
||||
fi
|
||||
|
||||
# Generate and load mise completion
|
||||
zmodload -F zsh/files b:zf_mv
|
||||
() {
|
||||
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._mise"
|
||||
zf_mv -f -- =( mise completion zsh ) "$ZSH_CACHE_DIR/completions/_mise"
|
||||
} &|
|
||||
# Generate completion only when missing/empty or stale relative to the mise binary.
|
||||
if [[ ! -s "$ZSH_CACHE_DIR/completions/_mise" || "$_mise_bin" -nt "$ZSH_CACHE_DIR/completions/_mise" ]]; then
|
||||
zmodload -F zsh/files b:zf_mv
|
||||
() {
|
||||
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._mise"
|
||||
zf_mv -f -- =( "$_mise_bin" completion zsh ) "$ZSH_CACHE_DIR/completions/_mise"
|
||||
} &|
|
||||
fi
|
||||
|
||||
unset _mise_bin
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
The primary job of this plugin is to provide `rbenv_prompt_info` which can be added to your theme to include Ruby
|
||||
version and gemset information into your prompt.
|
||||
|
||||
Additionally, this plugin provides completion for the `rbenv` command. See also <https://github.com/rbenv/rbenv/#shell-completions>.
|
||||
|
||||
Some functionality of this plugin will not work unless you also have the rbenv plugin *gemset* installed.
|
||||
https://github.com/jf/rbenv-gemset
|
||||
|
||||
|
||||
@@ -24,6 +24,13 @@ if [[ $FOUND_RBENV -ne 1 ]]; then
|
||||
fi
|
||||
|
||||
if [[ $FOUND_RBENV -eq 1 ]]; then
|
||||
rbenv_completions="${commands[rbenv]:A:h:h}/completions"
|
||||
if [[ -f "$rbenv_completions/_rbenv" ]]; then
|
||||
fpath+=("$rbenv_completions")
|
||||
autoload -Uz _rbenv
|
||||
compdef _rbenv rbenv
|
||||
fi
|
||||
|
||||
eval "$(rbenv init --no-rehash - zsh)"
|
||||
|
||||
alias rubies="rbenv versions"
|
||||
@@ -65,4 +72,4 @@ else
|
||||
}
|
||||
fi
|
||||
|
||||
unset FOUND_RBENV rbenvdirs dir
|
||||
unset FOUND_RBENV rbenvdirs dir rbenv_completions
|
||||
|
||||
Reference in New Issue
Block a user