Zdar, zkousim tumxinator ale nejak mi sam neodesle command.
Napriklad zkusim spusit test.yaml:
windows:
- itest:
- cd /home/makak/
To mi ale do commandliny napise 'cd /home/makak' ale enter musim zadat sam. Nevedel by nekdo prosim jak na to?
Jinak v bashi jsem si upizdil funkci ale nejak se mi nedari splitnout window:
# newWindow: $1 - window name, $2 go to directory
WindowCounter=1
newWindow(){
if [ "$#" -eq 1 ] ; then
wn=$1 # Window name
dr=$1 # directory
fi
if [ "$#" -eq 2 ] ; then
wn=$1 # Window name
dr=$2 # directory
fi
if [ $WindowCounter -gt 1 ] ; then
tmux new-window -t "$Sesname":"$WindowCounter" -n "$wn"
CD "$PWD/$dr"
else
tmux rename-window "$wn"
CD "$PWD/$dr"
fi
makeGopath
WindowCounter=$((WindowCounter+1))
}
Sesname=test
tmux -2 new-session -d -s $Sesname
newWindow test1 /test/src/
tmux attach -t $Sesname