README.md
· 79 B · Markdown
Sin formato
Add this to the end of your .bashrc to start nushell in zellij after ssh logon.
Add this to the end of your .bashrc to start nushell in zellij after ssh logon.
ssh-login-setup.sh
· 405 B · Bash
Sin formato
# Launch sequence for interactive SSH sessions only
if [[ $- == *i* ]] && [[ -n "$SSH_TTY" ]]; then
# 1. Launch Zellij WITHOUT 'exec' so the SSH parent shell stays alive
if [[ -z "$ZELLIJ" ]]; then
zellij
fi
# 2. Launch Nushell (either inside Zellij, or when you drop out of it)
if [[ -z "$NU_LAUNCHED" ]]; then
export NU_LAUNCHED=1
exec nu
fi
fi
| 1 | # Launch sequence for interactive SSH sessions only |
| 2 | if [[ $- == *i* ]] && [[ -n "$SSH_TTY" ]]; then |
| 3 | |
| 4 | # 1. Launch Zellij WITHOUT 'exec' so the SSH parent shell stays alive |
| 5 | if [[ -z "$ZELLIJ" ]]; then |
| 6 | zellij |
| 7 | fi |
| 8 | |
| 9 | # 2. Launch Nushell (either inside Zellij, or when you drop out of it) |
| 10 | if [[ -z "$NU_LAUNCHED" ]]; then |
| 11 | export NU_LAUNCHED=1 |
| 12 | exec nu |
| 13 | fi |
| 14 | |
| 15 | fi |