From 9f4b3b14e77b2faa209064dab224e91b7a35b073 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 7 Feb 2025 20:55:10 +0100 Subject: [PATCH] jj: Improve aliases --- vcs/jj/config/sh/alias.d/jj.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/vcs/jj/config/sh/alias.d/jj.sh b/vcs/jj/config/sh/alias.d/jj.sh index ed69305..a68adf2 100644 --- a/vcs/jj/config/sh/alias.d/jj.sh +++ b/vcs/jj/config/sh/alias.d/jj.sh @@ -10,14 +10,27 @@ if exist lazyjj; then fi alias js="jj status" -alias jd="jj describe" +alias jd="jj diff" alias jn="jj new" +alias jds="jj describe" alias jc="jj commit" -alias jl='jj log' -alias jlo='jj log --summary' -alias jloo='jj log --patch' -alias jo="jj op log" +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" @@ -25,6 +38,11 @@ alias jsi="jj squash --interactive" alias je="jj edit" alias jee="jj next --edit" -alias jun="jj undo" +# 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"