add functionality to open more connections
to the same server in split tmux pane with sshs
This commit is contained in:
parent
d1288439f6
commit
a41d84d492
3 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
|||
[ -e /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
|
||||
[ -e /usr/share/bash-completion/completions/ssh ] && . /usr/share/bash-completion/completions/ssh
|
||||
shopt -u hostcomplete && complete -F _ssh sshs
|
||||
shopt -u hostcomplete && complete -F _ssh sshs setserver
|
||||
|
|
|
@ -1259,5 +1259,11 @@ gocnfshome() {
|
|||
cd "${APP_SHARED_HOME}"
|
||||
}
|
||||
|
||||
setserver() {
|
||||
export sshcon="$@"
|
||||
if [ -n "${TMUX}" ]; then
|
||||
tmux set-environment sshcon "$@"
|
||||
fi
|
||||
}
|
||||
#EOF
|
||||
|
||||
|
|
6
sshs
6
sshs
|
@ -1,8 +1,10 @@
|
|||
#!/bin/sh
|
||||
sshs() {
|
||||
ENTRY
|
||||
|
||||
|
||||
[ $# -eq 0 ] && { [ "${sshcon:-x}" == "x" ] || set -- "${sshcon}"; }
|
||||
if [ -n "${TMUX}" ]; then
|
||||
tmux set-environment sshcon "$@"
|
||||
fi
|
||||
local LOGLEVEL="WARN"
|
||||
# MKTMPCMD='mktemp $(echo ${XDG_RUNTIME_DIR}/bashrc.XXXXXXXX.conf)'
|
||||
# VIMMKTMPCMD="mktemp ${XDG_RUNTIME_DIR}/vimrc.XXXXXXXX.conf"
|
||||
|
|
Loading…
Reference in a new issue