add check for reattach-to-user-namespace
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
This commit is contained in:
10
bin/login-shell
Executable file
10
bin/login-shell
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/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
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
set -g default-command "reattach-to-user-namespace -l zsh"
|
set -g default-command "login-shell"
|
||||||
# tmux display things in 256 colors
|
# tmux display things in 256 colors
|
||||||
set -g default-terminal "tmux-256color-italic"
|
set -g default-terminal "tmux-256color-italic"
|
||||||
set -g status-utf8 on
|
set -g status-utf8 on
|
||||||
|
|||||||
Reference in New Issue
Block a user