Skip to content

Commit 3dcc873

Browse files
committed
Add packages for git, use rust-parallel over xargs in git aliases
1 parent 4790aa2 commit 3dcc873

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

config/git/git.task.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ return hm.task({
44
name = "git",
55
description = "setup and configure node",
66
run = function(ctx)
7+
-- ctx:install({
8+
-- ["rust-parallel"] = {
9+
-- windows = "cargo",
10+
-- macos = "homebrew"
11+
-- };
12+
-- "git";
13+
-- "fzf";
14+
-- })
715
ctx:template("gitconfig.tmpl", hm.path(hm.home_dir, ".gitconfig"))
816

917
ctx:copy("gitignore-global", hm.path(hm.home_dir, ".gitignore"))

config/git/gitconfig.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
r = remote -v
3737
s = status
3838
st = status -bs
39-
co = "!git for-each-ref --format='%(refname:short)' refs/heads | fzf | xargs git checkout"
39+
co = "!git for-each-ref --format='%(refname:short)' refs/heads | fzf | rust-parallel git checkout"
4040
last = log -1 HEAD --stat
4141
pp = "!git pull && git push"
4242
pt = "!git pull && git pull --tags"
4343
up = "!git push && git push --tags"
44-
dead = "!git fetch --prune && git branch --merged | rg -v 'main|master' | xargs git branch -d"
45-
gone = "!git fetch --all --prune && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D;"
44+
dead = "!git fetch --prune && git branch --merged | rg -v 'main|master' | rust-parallel git branch -d"
45+
gone = "!git fetch --all --prune && git branch -vv | awk '/: gone]/{print $1}' | rust-parallel git branch -D;"
4646
[github]
4747
user = sondr3
4848
[core]

0 commit comments

Comments
 (0)