if reattach-to-user-name-space exists, run it, otherwise just run the shell * create login-shell command to perform this check * update tmux.conf to run login-shell instead of reattach-to-user-namespace directly
11 lines
231 B
Bash
Executable File
11 lines
231 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
shell=$(basename "$SHELL")
|
|
|
|
# check if reattach-to-user-namespace is available
|
|
if [ -n "$(command -v reattach-to-user-namespace)" ]; then
|
|
reattach-to-user-namespace -l "$shell"
|
|
else
|
|
exec "$shell -l"
|
|
fi
|