diff options
Diffstat (limited to 'dot/local/bin')
-rwxr-xr-x | dot/local/bin/git-ll-remote | 11 | ||||
-rwxr-xr-x | dot/local/bin/x11-ssh-host | 18 |
2 files changed, 22 insertions, 7 deletions
diff --git a/dot/local/bin/git-ll-remote b/dot/local/bin/git-ll-remote index 28b996f..dd76b78 100755 --- a/dot/local/bin/git-ll-remote +++ b/dot/local/bin/git-ll-remote | |||
@@ -18,7 +18,16 @@ do | |||
18 | esac | 18 | esac |
19 | done | 19 | done |
20 | 20 | ||
21 | remote=${1:-origin} | 21 | remote=${1:-$(git remote)} |
22 | |||
23 | if ! [ "$remote" ] | ||
24 | then | ||
25 | remote=$(git ls-remote --get-url) | ||
26 | if ! [ "$remote" ] | ||
27 | then | ||
28 | exit 1 | ||
29 | fi | ||
30 | fi | ||
22 | 31 | ||
23 | QUIET=y | 32 | QUIET=y |
24 | SHOW=all | 33 | SHOW=all |
diff --git a/dot/local/bin/x11-ssh-host b/dot/local/bin/x11-ssh-host index 166f491..a8620a7 100755 --- a/dot/local/bin/x11-ssh-host +++ b/dot/local/bin/x11-ssh-host | |||
@@ -1,15 +1,21 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | host=$(basename "$0") | 2 | host=$(basename "$0") |
3 | case "$host" in | 3 | case "$host" in |
4 | x11-ssh-host) host=$1 ;; | 4 | x11-ssh-host) |
5 | for host in "$@" | ||
6 | do | ||
7 | continue | ||
8 | done | ||
9 | ;; | ||
5 | esac | 10 | esac |
6 | 11 | ||
7 | SCRIPT="if which tmux && ! test -e .prefer-screen; then tmux attach || tmux new; else screen -xRR -e '^Zz'; fi" | 12 | SCRIPT="if which tmux && ! test -e .prefer-screen; then tmux attach || tmux new; else screen -xRR -e '^Zz'; fi" |
8 | 13 | ||
9 | if [ "$DISPLAY" -a ! -t 0 ]; then | 14 | set -- autossh -- "$@" -t $SCRIPT |
10 | exec xterm -T "$host" -e \ | 15 | |
11 | autossh "$host" -- -t $SCRIPT | 16 | if [ "$DISPLAY" -a ! -t 0 ] |
17 | then | ||
18 | exec xterm -T "$host" -e "$@" | ||
12 | else | 19 | else |
13 | exec \ | 20 | exec "$@" |
14 | autossh "$host" -- -t $SCRIPT | ||
15 | fi | 21 | fi |