diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/common/gt | 9 | ||||
| -rwxr-xr-x | bin/extra/tmux-sessionizer | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/bin/common/gt b/bin/common/gt index cf05a1e..bfd990f 100755 --- a/bin/common/gt +++ b/bin/common/gt @@ -67,7 +67,14 @@ while getopts ":a:c:f:dlsheu" opt; do fi repo="$(git rev-parse --show-toplevel 2>/dev/null)" - remote_url="$(git remote show -n origin 2>/dev/null | awk '/^ Fetch/ {print $NF}')" + remote_name= + if git remote show -n | grep 'origin' 2>/dev/null + then + remote_name="origin" + else + remote_name="$(git remote show -n | head -n 1)" + fi + remote_url="$(git remote show -n "$remote_name" 2>/dev/null | awk '/^ Fetch/ {print $NF}')" if [ -z "$repo" ] || [ -z "$remote_url" ] then >&2 printf 'Couldn'\''t add '\''%s'\'', not a git repository.\n' "$OPTARG" diff --git a/bin/extra/tmux-sessionizer b/bin/extra/tmux-sessionizer index 0404b6a..dada65e 100755 --- a/bin/extra/tmux-sessionizer +++ b/bin/extra/tmux-sessionizer @@ -3,7 +3,14 @@ # Path to your projects directory Prefix="$HOME/proj" # Paths in which to search for projects -Paths="$Prefix $Prefix/handmade" +Paths=" +$Prefix +$Prefix/handmade +$Prefix/suckless +$Prefix/personal +$Prefix/thirdparty +$Prefix/school +" if [ $# -eq 1 ]; then Selected="$1" |
