diff options
| author | Raymaekers Luca <luca@spacehb.net> | 2025-10-16 12:09:09 +0200 |
|---|---|---|
| committer | Raymaekers Luca <luca@spacehb.net> | 2025-10-16 12:09:09 +0200 |
| commit | 20d702194c2db3e1f0f06e8d40e5b43b6b347c1a (patch) | |
| tree | 0804e4d7e072ce91114e8fe828dfbada9d75cd1d /bin | |
| parent | 5eb23bd0b1d6536a22257eaa2cce3e1a7634873a (diff) | |
checkpoint
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" |
