mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Address review feedback
- Removed low-value aliases - Added alias `jla` for `jj log -r 'all()'` (I've been typing that a lot) - Renamed alias `js` to `jsq` to remove ambiguity with `jj split` - Use `zstyle` instead of an environment variable - Load completions asynchronously, I think
This commit is contained in:
parent
30abebff27
commit
6763ff3144
2 changed files with 23 additions and 19 deletions
|
|
@ -3,12 +3,20 @@ if (( ! $+commands[jj] )); then
|
|||
return
|
||||
fi
|
||||
|
||||
source <(jj util completion zsh)
|
||||
compdef _jj jj
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `jj`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_jj" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _jj
|
||||
_comps[jj]=_jj
|
||||
fi
|
||||
|
||||
jj util completion zsh >| "$ZSH_CACHE_DIR/completions/_jj" &|
|
||||
|
||||
function __jj_prompt_jj() {
|
||||
local flags=("--no-pager")
|
||||
if (( ${ZSH_THEME_JJ_IGNORE_WORKING_COPY:-0} )); then
|
||||
local -a flags
|
||||
flags=("--no-pager")
|
||||
if zstyle -t ':omz:plugins:jj' ignore-working-copy; then
|
||||
flags+=("--ignore-working-copy")
|
||||
fi
|
||||
command jj $flags "$@"
|
||||
|
|
@ -26,14 +34,6 @@ function jj_prompt_template() {
|
|||
}
|
||||
|
||||
# Aliases (sorted alphabetically)
|
||||
alias j='jj'
|
||||
alias jb='jj bookmark'
|
||||
alias jbc='jj bookmark create'
|
||||
alias jbd='jj bookmark d'
|
||||
alias jbl='jj bookmark list'
|
||||
alias jbr='jj bookmark rename'
|
||||
alias jbs='jj bookmark set'
|
||||
alias jbt='jj bookmark track'
|
||||
alias jc='jj commit'
|
||||
alias jcmsg='jj commit --message'
|
||||
alias jd='jj diff'
|
||||
|
|
@ -44,12 +44,10 @@ alias jgcl='jj git clone'
|
|||
alias jgf='jj git fetch'
|
||||
alias jgp='jj git push'
|
||||
alias jl='jj log'
|
||||
alias jla='jj log -r "all()"'
|
||||
alias jn='jj new'
|
||||
alias jrb='jj rebase'
|
||||
alias jrs='jj restore'
|
||||
alias jrt='cd "$(jj root || echo .)"'
|
||||
alias js='jj squash'
|
||||
alias jsp='jj split'
|
||||
alias jsps='jj split --siblings'
|
||||
alias jst='jj st'
|
||||
alias jsto='jj squash --into'
|
||||
alias jsq='jj squash'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue