-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: start local env #67
Conversation
|
||
# database: right pane (flyway migrate) | ||
tmux split-window -h -t $SESSION:"$WINDOW" | ||
tmux send-keys -t $SESS_NAME:"$WINDOW.1" "(cd server && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tää on vähä ruma stdoutissa, mutta hoitaa asiansa, eli ajaa migraatiot sitten kun docker on pystyssä.
tmux attach -t $SESS_NAME | ||
# TODO: Instead of return, kill the old session. | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Näin se poistais vanhan session, jos haluais, että scripti luo kaiken aina alusta.
tmux attach -t $SESS_NAME | |
# TODO: Instead of return, kill the old session. | |
return | |
tmux kill-session -t $SESS_NAME |
tmux new-window -t $SESS_NAME -n "$WINDOW" | ||
tmux send-keys -t $SESS_NAME:"$WINDOW" "git log --oneline --decorate=full --graph --all --oneline" C-m | ||
tmux split-window -h -t $SESSION:"$WINDOW" | ||
tmux send-keys -t $SESS_NAME:"$WINDOW.1" "ls -la" C-m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tree
:llä sais must paremman puurakenteen
tmux send-keys -t $SESS_NAME:"$WINDOW.1" "ls -la" C-m | |
tmux send-keys -t $SESS_NAME:"$WINDOW.1" "tree -L 2" C-m |
Ps. Mä käytän tmuxia näillä konffeilla # Plugins
set -g @plugin 'tmux-plugins/tpm'
# Use vi (vim) keyboard
set-window-option -g mode-keys vi
# Enable mouse scrolling
# On macOS:
# - Terminal.app -> View -> Enable mouse reporting
# - iTerm2.app -> Settings -> Profiles -> Terminal -> Enable mouse reporting
setw -g mouse on
# Don't use this on mac
#set -g default-terminal "screen-256color"s
# when splitting tmux window, use the same directory
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' |
Parannuksia tehty pullarissa |
importtasin scriptin repoon (mun .zhsrc:sta), jolla laitan itselleni devausympäristön pystyyn. Tämän lisäks, tämänkin jälkeen, i mulla on mun
~/.zshrc
- tiedostossa:Mun scripti käyttää https://github.com/tmux/tmux - Session manageria käynnistämään yhtä aikaa useita shell instasseja. Instassit, eli ikkunat: