1
0
Fork 0

Adding the ability to specify tmux session name.

Change-Id: Iee7f34de4448e9ab5d383e6e2eb871639271fdb5
pull/607/head
Matt Henkel 11 years ago
parent f2a826e963
commit 6741ac2639
No known key found for this signature in database
GPG Key ID: ABF07AC4F9DD0D70

@ -23,6 +23,10 @@ following line to *zpreztorc*:
In both cases, it will create a background session named _prezto_ if the tmux In both cases, it will create a background session named _prezto_ if the tmux
server is not started. server is not started.
You can change the default session name with:
zstyle ':prezto:module:tmux' session 'YOUR DEFAULT SESSION NAME'
With `auto-start` enabled, you may want to control how multiple sessions are With `auto-start` enabled, you may want to control how multiple sessions are
managed. The `destroy-unattached` option of tmux controls if the unattached managed. The `destroy-unattached` option of tmux controls if the unattached
sessions must be kept alive, making sessions available for later use, configured sessions must be kept alive, making sessions available for later use, configured

@ -31,10 +31,10 @@ if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \
# Create a 'prezto' session if no session has been defined in tmux.conf. # Create a 'prezto' session if no session has been defined in tmux.conf.
if ! tmux has-session 2> /dev/null; then if ! tmux has-session 2> /dev/null; then
tmux_session='prezto' zstyle -s ':prezto:module:tmux' session 'session' || session='prezto'
tmux \ tmux \
new-session -d -s "$tmux_session" \; \ new-session -d -s "$session" \; \
set-option -t "$tmux_session" destroy-unattached off &> /dev/null set-option -t "$session" destroy-unattached off &> /dev/null
fi fi
# Attach to the 'prezto' session or to the last session used. # Attach to the 'prezto' session or to the last session used.

Loading…
Cancel
Save