mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 0d75688d18c042526bb93f62f127ce7a2a129029
parent b88e76497c09be4c835ec392cddbc6b02227212d
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed, 22 Feb 2017 11:04:18 +0100

fixes urxvtpwd

Diffstat:
urxvtpwd | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/urxvtpwd b/urxvtpwd @@ -25,10 +25,10 @@ fi TITLE=$(xprop -id "$ID" | grep -m1 WM_NAME) MYPWD=$(echo "$TITLE" | cut -d'$' -f1 | cut -d'"' -f2- | cut -d':' -f2-) MYHOST=$(echo "$TITLE" | cut -d'$' -f1 | cut -d'"' -f2- | cut -d':' -f1 | tr -d ' ') -MYCOLON=$(echo "$TITLE" | cut -d'$' -f1 | cut -d'"' -f2- | grep ':' | cut -b1) +MYCOLON=$(echo "$TITLE" | cut -d'$' -f1 | cut -d'"' -f2- | grep -E '^[ a-z.]*:') MYPWD2="${MYPWD/#\~/$HOME}" -if [ -z "$MYHOST" -o "$MYCOLON" != ':' -o "$MYHOST" = "$CHOST" ] +if [ -z "$MYHOST" -o -z "$MYCOLON" -o "$MYHOST" = "$CHOST" ] then if [ ! -z "$MYPWD2" -a -d "$MYPWD2" -a -r "$MYPWD2" -a -x "$MYPWD2" ] then @@ -37,7 +37,7 @@ then exec $quoted_args fi else - if [ ! -z "$MYPWD2" -a -d "$MYPWD2" -a -r "$MYPWD2" -a -x "$MYPWD2" ] + if [ ! -z "$MYPWD2" ] then exec $quoted_args -e ssh -t "$MYHOST" "cd \"$MYPWD2\"; zsh" else