Skip to content

Commit 83982b5

Browse files
committed
Fixed shell for git execution + added repo ignore regex
1 parent 8d745d0 commit 83982b5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tgit/dmenu_tgit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ case "$option" in
1313
"checkout")
1414
branches="$(cd $path && git branch -r)"
1515
branch=$(echo -e "$branches" | dmenu -i -p Checkout:)
16-
x-terminal-emulator -e 'bash -c "cd '$path' && git '$option $branch'; zsh"'
16+
x-terminal-emulator -e 'sh -c "cd '$path' && git '$option $branch'; $SHELL"'
1717
;;
1818
"open")
1919
codium $path
2020
;;
2121
*)
22-
x-terminal-emulator -e 'bash -c "cd '$path' && git '$option'; zsh"'
22+
x-terminal-emulator -e 'sh -c "cd '$path' && git '$option'; $SHELL"'
2323
;;
2424
esac

tgit/tgit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash
22

33
repos=''
4+
ignore_regex='antigen|vim'
45

56
update() {
6-
repos=$(find $HOME -name ".git" | awk -F/ 'BEGIN { OFS = FS } NF{NF-=1};1' | grep -E -v 'vim|antigen')
7+
repos=$(find $HOME -name ".git" | awk -F/ 'BEGIN { OFS = FS } NF{NF-=1};1')
8+
[[ -n $ignore_regex ]] && repos=$(echo -e "$repos" | grep -E -v "$ignore_regex")
79
touch /tmp/repos.dat
810
echo -e "$repos" > /tmp/repos.dat
911
}

0 commit comments

Comments
 (0)