jj: use difftastic by default. add more aliases for convenience

This commit is contained in:
Daniel Lundin 2024-08-07 12:22:47 +02:00
parent 5868da6c29
commit abb479c2cd
No known key found for this signature in database
2 changed files with 35 additions and 8 deletions

View file

@ -23,7 +23,9 @@ end
function vcs_status function vcs_status
if __jj_in_repo if __jj_in_repo
jj status --ignore-working-copy jj status
echo
jj log --limit=20 -T builtin_log_comfortable -r "(main..@) | (main..@)-"
else else
git status -sb git status -sb
end end

View file

@ -42,11 +42,11 @@ in
ui = { ui = {
"default-command" = [ "default-command" = [
"log" "log"
"--limit=20" "--limit=25"
"--template=builtin_log_comfortable" "-T"
"builtin_log_comfortable"
]; ];
pager = "delta";
pager = "bat";
}; };
"merge-tools" = { "merge-tools" = {
@ -55,11 +55,21 @@ in
"$left" "$left"
"$right" "$right"
]; ];
difftu = {
program = "difft";
"diff-args" = [
"--color=always"
"--display=inline"
"$left"
"$right"
];
};
}; };
aliases = { aliases = {
l = [ l = [
"log" "log"
"--limit=25"
"-T" "-T"
"builtin_log_comfortable" "builtin_log_comfortable"
"-r" "-r"
@ -67,6 +77,7 @@ in
]; ];
la = [ la = [
"log" "log"
"--limit=25"
"-T" "-T"
"builtin_log_oneline" "builtin_log_oneline"
"-r" "-r"
@ -80,9 +91,23 @@ in
"new" "new"
"main" "main"
]; ];
d = [ "diff" ]; d = [
s = [ "show" ]; "diff"
sh = [ "--tool=difftu"
];
dd = [
"diff"
"--git"
];
ds = [
"diff"
"--tool=difft"
];
s = [
"show"
"--tool=difftu"
];
ss = [
"show" "show"
"--tool=difft" "--tool=difft"
]; ];