From 83982b593750ccf0548cd9604aad5d92da762f85 Mon Sep 17 00:00:00 2001 From: gabo Date: Thu, 18 Feb 2021 22:46:37 -0300 Subject: [PATCH] Fixed shell for git execution + added repo ignore regex --- tgit/dmenu_tgit | 4 ++-- tgit/tgit | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) 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 }