bash uses printf instead of print - make it work with bash too

This commit is contained in:
Uwe Werler 2019-05-23 12:01:24 +00:00
parent 1c21ae1284
commit 703fb41564

6
ssh.sh
View File

@ -76,7 +76,7 @@ _checkname(){
shift shift
done done
print ${_host} [[ ${SHELL} == /bin/bash ]] && printf ${_host} || print -r -- ${_host}
} }
_runxdotool(){ _runxdotool(){
@ -175,7 +175,7 @@ _ssh() {
$_tmux -f $_ssh_config new-session -d -s ${_sess} ${_cmd} $_tmux -f $_ssh_config new-session -d -s ${_sess} ${_cmd}
# add some settings into the session environment # add some settings into the session environment
$_tmux set-environment -g -t ${_sess} CMD "/bin/sh $0 -r" $_tmux set-environment -g -t ${_sess} CMD "/bin/bash $0 -r"
$_tmux set-hook -g -t ${_sess} after-new-window "run \$CMD" $_tmux set-hook -g -t ${_sess} after-new-window "run \$CMD"
$_tmux set-hook -g -t ${_sess} after-split-window "run \$CMD" $_tmux set-hook -g -t ${_sess} after-split-window "run \$CMD"
$_tmux bind R source-file $_ssh_config \\\; display-message "source-file done" $_tmux bind R source-file $_ssh_config \\\; display-message "source-file done"
@ -197,7 +197,7 @@ case "$_opt" in
;; ;;
r) r)
_setpane $OPTARG $@ _setpane
;; ;;
*) usage *) usage