fix bash aliases to start tmux
This commit is contained in:
1 parent
eff28a6aa9
commit
0e202d4c57
1 file changed
+4
-2
+4
-2
@@ -5,18 +5,20 @@ echo "## Mache ssh key verfügbar##"
|
|||||||
eval "$(ssh-agent -s)"
|
eval "$(ssh-agent -s)"
|
||||||
ssh-add ~/.ssh/id_bfds_gitea
|
ssh-add ~/.ssh/id_bfds_gitea
|
||||||
|
|
||||||
|
echo
|
||||||
echo "=============="
|
echo "=============="
|
||||||
echo "## Wechsel zu aktueller NixOS config Verzeichnis ##"
|
echo "## Wechsel zu aktueller NixOS config Verzeichnis ##"
|
||||||
echo "## run: git status"
|
echo "## run: git status"
|
||||||
cd /etc/nixos/
|
cd /etc/nixos/
|
||||||
git status
|
git status
|
||||||
|
|
||||||
|
echo
|
||||||
echo "=============="
|
echo "=============="
|
||||||
### !! if not running inside tmux, ask user to start tmux or create session !!
|
|
||||||
if [ -z "$TMUX" ]; then
|
|
||||||
alias tmuxxx='tmux -f /etc/nixos/dot-files/.tmux.conf new -d -s mainsession'
|
alias tmuxxx='tmux -f /etc/nixos/dot-files/.tmux.conf new -d -s mainsession'
|
||||||
alias tmuxx='tmux -f /etc/nixos/dot-files/.tmux.conf attach -t mainsession'
|
alias tmuxx='tmux -f /etc/nixos/dot-files/.tmux.conf attach -t mainsession'
|
||||||
|
|
||||||
|
### !! if not running inside tmux, ask user to start tmux or create session !!
|
||||||
|
if [ -z "$TMUX" ]; then
|
||||||
if ! tmux ls &> /dev/null; then
|
if ! tmux ls &> /dev/null; then
|
||||||
tmuxxx
|
tmuxxx
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user