Bash: prompt for tmux to show MOTD in SSH sessions
This commit is contained in:
parent
396624c6d5
commit
2ef53d351a
@ -29,6 +29,15 @@ popd() {
|
||||
cd .
|
||||
}
|
||||
|
||||
if [ -z "$TMUX" ] && [ "$PWD" == ~ ]; then
|
||||
tmux new -As default
|
||||
if [ -z "$TMUX" ] && [ -n "$SSH_TTY" ]; then
|
||||
tput sc
|
||||
tput smso
|
||||
echo -n 'tmux: space - shell: any key'
|
||||
tput sgr0
|
||||
read -rsN1 input
|
||||
tput rc
|
||||
tput el
|
||||
if [ "$input" = ' ' ]; then
|
||||
tmux new -As default
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user