diff --git a/tgit/dmenu_tgit b/tgit/dmenu_tgit index e196185..c0ae2c1 100755 --- a/tgit/dmenu_tgit +++ b/tgit/dmenu_tgit @@ -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 \ No newline at end of file diff --git a/tgit/tgit b/tgit/tgit index 124a723..7753870 100755 --- a/tgit/tgit +++ b/tgit/tgit @@ -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 }