mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 16:19:26 +00:00
Compare commits
1 Commits
pull/651-g
...
pull/556-p
Author | SHA1 | Date | |
---|---|---|---|
72f8d15b21 |
@ -55,8 +55,6 @@ alias gcr='git revert'
|
|||||||
alias gcR='git reset "HEAD^"'
|
alias gcR='git reset "HEAD^"'
|
||||||
alias gcs='git show'
|
alias gcs='git show'
|
||||||
alias gcl='git-commit-lost'
|
alias gcl='git-commit-lost'
|
||||||
alias gcS='git commit -S'
|
|
||||||
alias gpS='git show --pretty=short --show-signature'
|
|
||||||
|
|
||||||
# Conflict (C)
|
# Conflict (C)
|
||||||
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
|
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
|
||||||
@ -109,7 +107,6 @@ alias glo='git log --topo-order --pretty=format:${_git_log_oneline_format}'
|
|||||||
alias glg='git log --topo-order --all --graph --pretty=format:${_git_log_oneline_format}'
|
alias glg='git log --topo-order --all --graph --pretty=format:${_git_log_oneline_format}'
|
||||||
alias glb='git log --topo-order --pretty=format:${_git_log_brief_format}'
|
alias glb='git log --topo-order --pretty=format:${_git_log_brief_format}'
|
||||||
alias glc='git shortlog --summary --numbered'
|
alias glc='git shortlog --summary --numbered'
|
||||||
alias glS='git log --show-signature'
|
|
||||||
|
|
||||||
# Merge (m)
|
# Merge (m)
|
||||||
alias gm='git merge'
|
alias gm='git merge'
|
||||||
@ -171,10 +168,6 @@ alias gSs='git submodule sync'
|
|||||||
alias gSu='git submodule foreach git pull origin master'
|
alias gSu='git submodule foreach git pull origin master'
|
||||||
alias gSx='git-submodule-remove'
|
alias gSx='git-submodule-remove'
|
||||||
|
|
||||||
# Tag (t)
|
|
||||||
alias gts='git tag -s'
|
|
||||||
alias gtv='git verify-tag'
|
|
||||||
|
|
||||||
# Working Copy (w)
|
# Working Copy (w)
|
||||||
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
|
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
|
||||||
alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
|
alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
|
||||||
|
@ -348,13 +348,13 @@ function git-info {
|
|||||||
# Format added.
|
# Format added.
|
||||||
if (( added > 0 )); then
|
if (( added > 0 )); then
|
||||||
zstyle -s ':prezto:module:git:info:added' format 'added_format'
|
zstyle -s ':prezto:module:git:info:added' format 'added_format'
|
||||||
zformat -f added_formatted "$added_format" "a:$added"
|
zformat -f added_formatted "$added_format" "a:$added_format"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format deleted.
|
# Format deleted.
|
||||||
if (( deleted > 0 )); then
|
if (( deleted > 0 )); then
|
||||||
zstyle -s ':prezto:module:git:info:deleted' format 'deleted_format'
|
zstyle -s ':prezto:module:git:info:deleted' format 'deleted_format'
|
||||||
zformat -f deleted_formatted "$deleted_format" "d:$deleted"
|
zformat -f deleted_formatted "$deleted_format" "d:$deleted_format"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format modified.
|
# Format modified.
|
||||||
|
@ -30,6 +30,10 @@ Perlbrew
|
|||||||
An alternative to the above is to use [Perlbrew][2], which allows for the
|
An alternative to the above is to use [Perlbrew][2], which allows for the
|
||||||
management of multiple, isolated Perl installations in the home directory.
|
management of multiple, isolated Perl installations in the home directory.
|
||||||
|
|
||||||
|
You can specify the perlbrew location so the environment is automatically loaded.
|
||||||
|
|
||||||
|
zstyle ':prezto:module:perl:perlbrew' location '/path/to/perlbrew'
|
||||||
|
|
||||||
Aliases
|
Aliases
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -29,6 +29,13 @@ if [[ "$OSTYPE" == darwin* ]]; then
|
|||||||
|
|
||||||
unset perl_path
|
unset perl_path
|
||||||
unset cache_file
|
unset cache_file
|
||||||
|
|
||||||
|
# Perlbrew
|
||||||
|
zstyle -s ':prezto:module:perl:perlbrew' location '_perlbrew_root'
|
||||||
|
if [[ -s "${_perlbrew_root}/etc/bashrc" ]]; then
|
||||||
|
export PERLBREW_ROOT="${_perlbrew_root}"
|
||||||
|
source "${_perlbrew_root}/etc/bashrc"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -16,12 +16,9 @@ elif (( $+commands[pyenv] )); then
|
|||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
|
|
||||||
# Prepend PEP 370 per user site packages directory, which defaults to
|
# Prepend PEP 370 per user site packages directory, which defaults to
|
||||||
# ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH. The
|
# ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH.
|
||||||
# path can be overridden using PYTHONUSERBASE.
|
|
||||||
else
|
else
|
||||||
if [[ -n "$PYTHONUSERBASE" ]]; then
|
if [[ "$OSTYPE" == darwin* ]]; then
|
||||||
path=($PYTHONUSERBASE/bin $path)
|
|
||||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
path=($HOME/Library/Python/*/bin(N) $path)
|
path=($HOME/Library/Python/*/bin(N) $path)
|
||||||
else
|
else
|
||||||
# This is subject to change.
|
# This is subject to change.
|
||||||
|
@ -15,7 +15,7 @@ fi
|
|||||||
# Auto Start
|
# Auto Start
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z "$STY" && -z "$EMACS" && -z "$VIM" ]] && ( \
|
if [[ -z "$STY" && ( -z "$INSIDE_EMACS" || -z "$EMACS" || -z "$VIM" ) ]] && ( \
|
||||||
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' remote ) ||
|
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' remote ) ||
|
||||||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' local ) \
|
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' local ) \
|
||||||
); then
|
); then
|
||||||
|
@ -20,15 +20,12 @@ following line to *zpreztorc*:
|
|||||||
|
|
||||||
zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
||||||
|
|
||||||
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_ and attach
|
||||||
server is not started.
|
every new shell to it.
|
||||||
|
|
||||||
With `auto-start` enabled, you may want to control how multiple sessions are
|
To avoid keeping open sessions, this module sets `destroy-unattached off` on
|
||||||
managed. The `destroy-unattached` option of tmux controls if the unattached
|
the background session and `destroy-unattached on` on every other session
|
||||||
sessions must be kept alive, making sessions available for later use, configured
|
(global setting).
|
||||||
in *tmux.conf*:
|
|
||||||
|
|
||||||
set-option -g destroy-unattached [on | off]
|
|
||||||
|
|
||||||
Aliases
|
Aliases
|
||||||
-------
|
-------
|
||||||
@ -44,7 +41,7 @@ connected** to be displayed, which can be fixed by installing
|
|||||||
[reattach-to-user-namespace][3], available in [Homebrew][4], and adding the
|
[reattach-to-user-namespace][3], available in [Homebrew][4], and adding the
|
||||||
following to *tmux.conf*:
|
following to *tmux.conf*:
|
||||||
|
|
||||||
set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"
|
set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"
|
||||||
|
|
||||||
Furthermore, tmux is known to cause **kernel panics** on Mac OS X. A discussion
|
Furthermore, tmux is known to cause **kernel panics** on Mac OS X. A discussion
|
||||||
about this and Prezto has already been [opened][2].
|
about this and Prezto has already been [opened][2].
|
||||||
@ -57,7 +54,6 @@ Authors
|
|||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
- [Colin Hebert](https://github.com/ColinHebert)
|
- [Colin Hebert](https://github.com/ColinHebert)
|
||||||
- [Georges Discry](https://github.com/gdiscry)
|
- [Georges Discry](https://github.com/gdiscry)
|
||||||
- [Xavier Cambar](https://github.com/xcambar)
|
|
||||||
|
|
||||||
[1]: http://tmux.sourceforge.net
|
[1]: http://tmux.sourceforge.net
|
||||||
[2]: https://github.com/sorin-ionescu/prezto/issues/62
|
[2]: https://github.com/sorin-ionescu/prezto/issues/62
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
# Colin Hebert <hebert.colin@gmail.com>
|
# Colin Hebert <hebert.colin@gmail.com>
|
||||||
# Georges Discry <georges@discry.be>
|
# Georges Discry <georges@discry.be>
|
||||||
# Xavier Cambar <xcambar@gmail.com>
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Return if requirements are not found.
|
# Return if requirements are not found.
|
||||||
@ -17,22 +16,31 @@ fi
|
|||||||
# Auto Start
|
# Auto Start
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \
|
if [[ -z "$TMUX" && ( -z "$INSIDE_EMACS" || -z "$EMACS" || -z "$VIM" ) ]] && ( \
|
||||||
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
|
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
|
||||||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
||||||
); then
|
); then
|
||||||
tmux start-server
|
tmux_session='prezto'
|
||||||
|
|
||||||
# Create a 'prezto' session if no session has been defined in tmux.conf.
|
if ! tmux has-session -t "$tmux_session" 2> /dev/null; then
|
||||||
if ! tmux has-session 2> /dev/null; then
|
# Ensure that tmux server is started.
|
||||||
tmux_session='prezto'
|
tmux start-server
|
||||||
tmux \
|
|
||||||
new-session -d -s "$tmux_session" \; \
|
# Disable the destruction of unattached sessions globally.
|
||||||
set-option -t "$tmux_session" destroy-unattached off &> /dev/null
|
tmux set-option -g destroy-unattached off &> /dev/null
|
||||||
|
|
||||||
|
# Create a new session.
|
||||||
|
tmux new-session -d -s "$tmux_session"
|
||||||
|
|
||||||
|
# Disable the destruction of the new, unattached session.
|
||||||
|
tmux set-option -t "$tmux_session" destroy-unattached off &> /dev/null
|
||||||
|
|
||||||
|
# Enable the destruction of unattached sessions globally to prevent
|
||||||
|
# an abundance of open, detached sessions.
|
||||||
|
tmux set-option -g destroy-unattached on &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Attach to the 'prezto' session or to the last session used.
|
exec tmux new-session -t "$tmux_session"
|
||||||
exec tmux attach-session
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -152,3 +152,4 @@ zstyle ':prezto:module:prompt' theme 'sorin'
|
|||||||
|
|
||||||
# Auto start a session when Zsh is launched in a SSH connection.
|
# Auto start a session when Zsh is launched in a SSH connection.
|
||||||
# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user