bash: tmux azuto-attach not for root
This commit is contained in:
parent
39f988fc44
commit
7051ef7d96
1 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
### tmux auto attach
|
### tmux auto attach
|
||||||
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
|
|
||||||
|
# Check if the user ID is not 0 (root)
|
||||||
|
if [ "$EUID" -ne 0 ]; then
|
||||||
|
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
|
||||||
tmux attach -t default || tmux new -s default
|
tmux attach -t default || tmux new -s default
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### keychain
|
### keychain
|
||||||
|
|
Loading…
Reference in a new issue