From bfb4fadee0bac175a965df90dd033e74fc60b05d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 18 Sep 2024 17:46:05 +0200 Subject: [PATCH] vcs: Add aliases for jj --- .dotter/global.toml | 2 +- vcs/jj/{ => jj}/config.toml | 0 vcs/jj/sh/alias.d/jj.sh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) rename vcs/jj/{ => jj}/config.toml (100%) create mode 100644 vcs/jj/sh/alias.d/jj.sh diff --git a/.dotter/global.toml b/.dotter/global.toml index c6294a9..504b5b7 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -16,7 +16,7 @@ sh = "~" [vcs.files] "vcs/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" } "vcs/git" = "~/.config" -"vcs/jj" = "~/.config/jj" +"vcs/jj" = "~/.config" "vcs/gitignore/config" = "~/.config" "vcs/gitignore/local" = "~/.local" vcs = "~" diff --git a/vcs/jj/config.toml b/vcs/jj/jj/config.toml similarity index 100% rename from vcs/jj/config.toml rename to vcs/jj/jj/config.toml diff --git a/vcs/jj/sh/alias.d/jj.sh b/vcs/jj/sh/alias.d/jj.sh new file mode 100644 index 0000000..ed69305 --- /dev/null +++ b/vcs/jj/sh/alias.d/jj.sh @@ -0,0 +1,30 @@ +#!/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 describe" +alias jn="jj new" +alias jc="jj commit" + +alias jl='jj log' +alias jlo='jj log --summary' +alias jloo='jj log --patch' +alias jo="jj op log" + +alias jss="jj squash" +alias jsi="jj squash --interactive" + +alias je="jj edit" +alias jee="jj next --edit" + +alias jun="jj undo" + +alias jp="jj git push"