jj: Rework jj bookmark main alias

Changed into a function which takes the revision to set the bookmark to
as an argument. This should work without interfering much since the
bookmark name that the `bookmark set` function _usually_ takes as
argument is already given by the alias (always 'main') and thus we do
not have to manually provide other arguments.

It default to the current working copy just like the command and
otherwise can point to any change.
This commit is contained in:
Marty Oehme 2025-02-22 11:23:46 +01:00
parent 89737536ea
commit 5ab95c724f
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -64,7 +64,9 @@ alias jrb="jj rebase"
# 'branching' bookmark work
alias jb="jj bookmark"
alias jbm="jj bookmark set main"
jbm() {
jj bookmark set -r "${1:-@}" main
}
# remote work
alias jrv="jj git remote list"