Skip to content

Commit

Permalink
Fixed shell for git execution + added repo ignore regex
Browse files Browse the repository at this point in the history
  • Loading branch information
gbgabo committed Feb 19, 2021
1 parent 8d745d0 commit 83982b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tgit/dmenu_tgit
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ case "$option" in
"checkout")
branches="$(cd $path && git branch -r)"
branch=$(echo -e "$branches" | dmenu -i -p Checkout:)
x-terminal-emulator -e 'bash -c "cd '$path' && git '$option $branch'; zsh"'
x-terminal-emulator -e 'sh -c "cd '$path' && git '$option $branch'; $SHELL"'
;;
"open")
codium $path
;;
*)
x-terminal-emulator -e 'bash -c "cd '$path' && git '$option'; zsh"'
x-terminal-emulator -e 'sh -c "cd '$path' && git '$option'; $SHELL"'
;;
esac
4 changes: 3 additions & 1 deletion tgit/tgit
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

repos=''
ignore_regex='antigen|vim'

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

0 comments on commit 83982b5

Please sign in to comment.