From ff0dfa424d7f2b32379aad37e1c2ead4457866d8 Mon Sep 17 00:00:00 2001 From: Xavier Cambar Date: Wed, 12 Mar 2014 16:59:00 +0100 Subject: [PATCH 1/2] Create a default tmux session only when none defined in tmux.conf Signed-off-by: Sorin Ionescu --- modules/tmux/init.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/tmux/init.zsh b/modules/tmux/init.zsh index c6c3626..29b547f 100644 --- a/modules/tmux/init.zsh +++ b/modules/tmux/init.zsh @@ -21,12 +21,12 @@ if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \ ( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) || ( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \ ); then - tmux_session='prezto' + tmux start-server - # Create a first 'prezto' session if tmux is starting. + # Create a 'prezto' session if no session has been defined in tmux.conf. if ! tmux has-session 2> /dev/null; then + tmux_session='prezto' tmux \ - start-server \; \ new-session -d -s "$tmux_session" \; \ set-option -t "$tmux_session" destroy-unattached off &> /dev/null fi From bf9dbfd5b95c44b14a8a6af8ecf965ecea50fb29 Mon Sep 17 00:00:00 2001 From: Arthur Noel Date: Mon, 17 Mar 2014 17:31:21 +0000 Subject: [PATCH 2/2] Support $PYTHONUSERBASE per PEP 370 Signed-off-by: Sorin Ionescu --- modules/python/init.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/python/init.zsh b/modules/python/init.zsh index fa9175e..5715b02 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -16,9 +16,12 @@ elif (( $+commands[pyenv] )); then eval "$(pyenv init -)" # Prepend PEP 370 per user site packages directory, which defaults to -# ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH. +# ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH. The +# path can be overridden using PYTHONUSERBASE. else - if [[ "$OSTYPE" == darwin* ]]; then + if [[ -n "$PYTHONUSERBASE" ]]; then + path=($PYTHONUSERBASE/bin $path) + elif [[ "$OSTYPE" == darwin* ]]; then path=($HOME/Library/Python/*/bin(N) $path) else # This is subject to change.