dotfiles/vcs/jj/config/sh/alias.d/jj.sh
2025-02-07 23:10:38 +01:00

48 lines
930 B
Bash

#!/usr/bin/env sh
if ! exist jj; then
return 1
fi
alias j='jj' # necessary for a thing as easy to type?
if exist lazyjj; then
alias lj="lazyjj"
fi
alias js="jj status"
alias jd="jj diff"
alias jn="jj new"
alias jds="jj describe"
alias jc="jj commit"
alias jln="jj log -T builtin_log_oneline"
alias jl="jj log -r '@ | ancestors(remote_bookmarks().., 2) | trunk()'"
alias jL="jj log -r 'all()'"
alias jlo="jj log --summary"
alias jLO="jj log --summary -r 'all()'"
alias jloo="jj log --patch"
alias jol="jj op log"
jlf() {
jj log -r "description($*)"
}
jlof() {
jj log --summary -r "description($*)"
}
jloof() {
jj log --patch -r "description($*)"
}
alias jss="jj squash"
alias jsi="jj squash --interactive"
alias je="jj edit"
alias jee="jj next --edit"
# show branches w a couple commits
alias jb="jj log -r 'ancestors(heads(all()), 3)'"
alias jrb="jj rebase"
alias ju="jj undo"
alias jp="jj git push"