1
0
Fork 0

Merge branch 'master' of https://github.com/sorin-ionescu/prezto into sorin-ionescu-master

pull/1281/head
zephyrus 8 years ago
commit 8637d7090e

6
.gitmodules vendored

@ -1,3 +1,6 @@
[submodule "modules/autosuggestions/external"]
path = modules/autosuggestions/external
url = https://github.com/zsh-users/zsh-autosuggestions
[submodule "modules/history-substring-search/external"]
path = modules/history-substring-search/external
url = https://github.com/zsh-users/zsh-history-substring-search.git
@ -16,6 +19,3 @@
[submodule "modules/prompt/functions/pure"]
path = modules/prompt/external/pure
url = https://github.com/sindresorhus/pure.git
[submodule "modules/autosuggestions/external"]
path = modules/autosuggestions/external
url = https://github.com/tarruda/zsh-autosuggestions

@ -0,0 +1,20 @@
Copyright (c) 2009-2011 Robby Russell and contributors
Copyright (c) 2011-2017 Sorin Ionescu and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

@ -13,23 +13,25 @@ version is 4.3.17.
1. Launch Zsh:
zsh
`zsh`
2. Clone the repository:
git clone --recursive https://github.com/zephyrus/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
`git clone --recursive https://github.com/zephyrus/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"`
3. Create a new Zsh configuration by copying the Zsh configuration files
provided:
```
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
```
4. Set Zsh as your default shell:
chsh -s /bin/zsh
`chsh -s /bin/zsh`
5. Open a new Zsh terminal window or tab.
@ -83,29 +85,7 @@ The [Zsh Reference Card][7] and the [zsh-lovers][8] man page are indispensable.
License
-------
(The MIT License)
Copyright (c) 2009-2011 Robby Russell and contributors.
Copyright (c) 2011-2015 Sorin Ionescu and contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This project is licensed under the MIT License.
[1]: http://www.zsh.org
[2]: http://i.imgur.com/nrGV6pg.png "sorin theme"

@ -25,13 +25,13 @@ unset min_zsh_version
function pmodload {
local -a pmodules
local pmodule
local pfunction_glob='^([_.]*|prompt_*_setup|README*)(-.N:t)'
local pfunction_glob='^([_.]*|prompt_*_setup|README*|*~)(-.N:t)'
# $argv is overridden in the anonymous function.
pmodules=("$argv[@]")
# Add functions to $fpath.
fpath=(${pmodules:+${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions(/FN)} $fpath)
fpath=(${pmodules:+$ZPREZTODIR/modules/${^pmodules}/functions(/FN)} $fpath)
function {
local pfunction
@ -40,7 +40,7 @@ function pmodload {
setopt LOCAL_OPTIONS EXTENDED_GLOB
# Load Prezto functions.
for pfunction in ${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions/$~pfunction_glob; do
for pfunction in $ZPREZTODIR/modules/${^pmodules}/functions/$~pfunction_glob; do
autoload -Uz "$pfunction"
done
}
@ -49,19 +49,19 @@ function pmodload {
for pmodule in "$pmodules[@]"; do
if zstyle -t ":prezto:module:$pmodule" loaded 'yes' 'no'; then
continue
elif [[ ! -d "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule" ]]; then
elif [[ ! -d "$ZPREZTODIR/modules/$pmodule" ]]; then
print "$0: no such module: $pmodule" >&2
continue
else
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/init.zsh"
if [[ -s "$ZPREZTODIR/modules/$pmodule/init.zsh" ]]; then
source "$ZPREZTODIR/modules/$pmodule/init.zsh"
fi
if (( $? == 0 )); then
zstyle ":prezto:module:$pmodule" loaded 'yes'
else
# Remove the $fpath entry.
fpath[(r)${ZDOTDIR:-$HOME}/.zprezto/modules/${pmodule}/functions]=()
fpath[(r)${ZPREZTODIR}/modules/${pmodule}/functions]=()
function {
local pfunction
@ -71,7 +71,7 @@ function pmodload {
setopt LOCAL_OPTIONS EXTENDED_GLOB
# Unload Prezto functions.
for pfunction in ${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/functions/$~pfunction_glob; do
for pfunction in $ZPREZTODIR/modules/$pmodule/functions/$~pfunction_glob; do
unfunction "$pfunction"
done
}
@ -86,6 +86,12 @@ function pmodload {
# Prezto Initialization
#
# This finds the directory prezto is installed to so plugin managers don't need
# to rely on dirty hacks to force prezto into a directory. Additionally, it
# needs to be done here because inside the pmodload function ${0:h} evaluates to
# the current directory of the shell rather than the prezto dir.
ZPREZTODIR=${0:h}
# Source the Prezto configuration file.
if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then
source "${ZDOTDIR:-$HOME}/.zpreztorc"

@ -1 +1 @@
Subproject commit f0a745576ff69fa608421ee7214d4cd77b43e62f
Subproject commit 9cfaf5d3424ceb5fedd2c7e3253f823faae74383

@ -1 +1 @@
Subproject commit 3a2bb8781d32d05d1bf05deeeb476beb651e8272
Subproject commit 72af5d08f1c07507d74103af039e98a2791fccb5

@ -54,4 +54,4 @@ fi
alias deb-build='time dpkg-buildpackage -rfakeroot -us -uc'
# Removes all kernel images and headers, except for the ones in use.
alias deb-kclean='sudo aptitude remove -P "?and(~i~nlinux-(ima|hea) ?not(~n`uname -r`))"'
alias deb-kclean='sudo aptitude remove -P "?and(~i~nlinux-(ima|hea) ?not(~n$(uname -r)))"'

@ -326,4 +326,4 @@ else
print "prezto: editor: invalid key bindings: $key_bindings" >&2
fi
unset key{,map,bindings}
unset key{,map,_bindings}

@ -29,6 +29,10 @@ This setting affects all aliases and functions that call `git-status`.
Aliases
-------
Aliases are enabled by default. You can disable them with:
zstyle ':prezto:module:git:alias' skip 'yes'
### Git
- `g` is short for `git`.
@ -214,6 +218,7 @@ The following aliases may shadow system commands:
- `gpt` shadows the [GUID partition table maintenance utility][4].
- `gs` shadows the [Ghostscript][5].
- `gb` shadows the [GB][9].
If you frequently use the above commands, you may wish to remove said aliases
from this module or to disable them at the bottom of the zshrc with `unalias`.
@ -332,3 +337,4 @@ Authors
[6]: https://github.com/sorin-ionescu/prezto/issues
[7]: https://github.com/sorin-ionescu/prezto/issues/219
[8]: http://www.kernel.org/pub/software/scm/git/docs/git-log.html
[9]: https://getgb.io/

@ -26,156 +26,159 @@ zstyle -s ':prezto:module:git:status:ignore' submodules '_git_status_ignore_subm
# Aliases
#
# Git
alias g='git'
# Branch (b)
alias gb='git branch'
alias gbc='git checkout -b'
alias gbl='git branch -v'
alias gbL='git branch -av'
alias gbx='git branch -d'
alias gbX='git branch -D'
alias gbm='git branch -m'
alias gbM='git branch -M'
alias gbs='git show-branch'
alias gbS='git show-branch -a'
# Commit (c)
alias gc='git commit --verbose'
alias gca='git commit --verbose --all'
alias gcm='git commit --message'
alias gco='git checkout'
alias gcO='git checkout --patch'
alias gcf='git commit --amend --reuse-message HEAD'
alias gcF='git commit --verbose --amend'
alias gcp='git cherry-pick --ff'
alias gcP='git cherry-pick --no-commit'
alias gcr='git revert'
alias gcR='git reset "HEAD^"'
alias gcs='git show'
alias gcl='git-commit-lost'
# Conflict (C)
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
alias gCa='git add $(gCl)'
alias gCe='git mergetool $(gCl)'
alias gCo='git checkout --ours --'
alias gCO='gCo $(gCl)'
alias gCt='git checkout --theirs --'
alias gCT='gCt $(gCl)'
# Data (d)
alias gd='git ls-files'
alias gdc='git ls-files --cached'
alias gdx='git ls-files --deleted'
alias gdm='git ls-files --modified'
alias gdu='git ls-files --other --exclude-standard'
alias gdk='git ls-files --killed'
alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"'
# Fetch (f)
alias gf='git fetch'
alias gfc='git clone'
alias gfm='git pull'
alias gfr='git pull --rebase'
# Grep (g)
alias gg='git grep'
alias ggi='git grep --ignore-case'
alias ggl='git grep --files-with-matches'
alias ggL='git grep --files-without-matches'
alias ggv='git grep --invert-match'
alias ggw='git grep --word-regexp'
# Index (i)
alias gia='git add'
alias giA='git add --patch'
alias giu='git add --update'
alias gid='git diff --no-ext-diff --cached'
alias giD='git diff --no-ext-diff --cached --word-diff'
alias gir='git reset'
alias giR='git reset --patch'
alias gix='git rm -r --cached'
alias giX='git rm -rf --cached'
# Log (l)
alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"'
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
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 glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
alias glc='git shortlog --summary --numbered'
# Merge (m)
alias gm='git merge'
alias gmC='git merge --no-commit'
alias gmF='git merge --no-ff'
alias gma='git merge --abort'
alias gmt='git mergetool'
# Push (p)
alias gp='git push'
alias gpf='git push --force'
alias gpa='git push --all'
alias gpA='git push --all && git push --tags'
alias gpt='git push --tags'
alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"'
alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"'
# Rebase (r)
alias gr='git rebase'
alias gra='git rebase --abort'
alias grc='git rebase --continue'
alias gri='git rebase --interactive'
alias grs='git rebase --skip'
# Remote (R)
alias gR='git remote'
alias gRl='git remote --verbose'
alias gRa='git remote add'
alias gRx='git remote rm'
alias gRm='git remote rename'
alias gRu='git remote update'
alias gRp='git remote prune'
alias gRs='git remote show'
alias gRb='git-hub-browse'
# Stash (s)
alias gs='git stash'
alias gsa='git stash apply'
alias gsx='git stash drop'
alias gsX='git-stash-clear-interactive'
alias gsl='git stash list'
alias gsL='git-stash-dropped'
alias gsd='git stash show --patch --stat'
alias gsp='git stash pop'
alias gsr='git-stash-recover'
alias gss='git stash save --include-untracked'
alias gsS='git stash save --patch --no-keep-index'
alias gsw='git stash save --include-untracked --keep-index'
# Submodule (S)
alias gS='git submodule'
alias gSa='git submodule add'
alias gSf='git submodule foreach'
alias gSi='git submodule init'
alias gSI='git submodule update --init --recursive'
alias gSl='git submodule status'
alias gSm='git-submodule-move'
alias gSs='git submodule sync'
alias gSu='git submodule foreach git pull origin master'
alias gSx='git-submodule-remove'
# Working Copy (w)
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
alias gwd='git diff --no-ext-diff'
alias gwD='git diff --no-ext-diff --word-diff'
alias gwr='git reset --soft'
alias gwR='git reset --hard'
alias gwc='git clean -n'
alias gwC='git clean -f'
alias gwx='git rm -r'
alias gwX='git rm -rf'
if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then
# Git
alias g='git'
# Branch (b)
alias gb='git branch'
alias gbc='git checkout -b'
alias gbl='git branch -v'
alias gbL='git branch -av'
alias gbx='git branch -d'
alias gbX='git branch -D'
alias gbm='git branch -m'
alias gbM='git branch -M'
alias gbs='git show-branch'
alias gbS='git show-branch -a'
# Commit (c)
alias gc='git commit --verbose'
alias gca='git commit --verbose --all'
alias gcm='git commit --message'
alias gco='git checkout'
alias gcO='git checkout --patch'
alias gcf='git commit --amend --reuse-message HEAD'
alias gcF='git commit --verbose --amend'
alias gcp='git cherry-pick --ff'
alias gcP='git cherry-pick --no-commit'
alias gcr='git revert'
alias gcR='git reset "HEAD^"'
alias gcs='git show'
alias gcl='git-commit-lost'
# Conflict (C)
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
alias gCa='git add $(gCl)'
alias gCe='git mergetool $(gCl)'
alias gCo='git checkout --ours --'
alias gCO='gCo $(gCl)'
alias gCt='git checkout --theirs --'
alias gCT='gCt $(gCl)'
# Data (d)
alias gd='git ls-files'
alias gdc='git ls-files --cached'
alias gdx='git ls-files --deleted'
alias gdm='git ls-files --modified'
alias gdu='git ls-files --other --exclude-standard'
alias gdk='git ls-files --killed'
alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"'
# Fetch (f)
alias gf='git fetch'
alias gfc='git clone'
alias gfm='git pull'
alias gfr='git pull --rebase'
# Grep (g)
alias gg='git grep'
alias ggi='git grep --ignore-case'
alias ggl='git grep --files-with-matches'
alias ggL='git grep --files-without-matches'
alias ggv='git grep --invert-match'
alias ggw='git grep --word-regexp'
# Index (i)
alias gia='git add'
alias giA='git add --patch'
alias giu='git add --update'
alias gid='git diff --no-ext-diff --cached'
alias giD='git diff --no-ext-diff --cached --word-diff'
alias gir='git reset'
alias giR='git reset --patch'
alias gix='git rm -r --cached'
alias giX='git rm -rf --cached'
# Log (l)
alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"'
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
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 glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
alias glc='git shortlog --summary --numbered'
# Merge (m)
alias gm='git merge'
alias gmC='git merge --no-commit'
alias gmF='git merge --no-ff'
alias gma='git merge --abort'
alias gmt='git mergetool'
# Push (p)
alias gp='git push'
alias gpf='git push --force-with-lease'
alias gpF='git push --force'
alias gpa='git push --all'
alias gpA='git push --all && git push --tags'
alias gpt='git push --tags'
alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"'
alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"'
# Rebase (r)
alias gr='git rebase'
alias gra='git rebase --abort'
alias grc='git rebase --continue'
alias gri='git rebase --interactive'
alias grs='git rebase --skip'
# Remote (R)
alias gR='git remote'
alias gRl='git remote --verbose'
alias gRa='git remote add'
alias gRx='git remote rm'
alias gRm='git remote rename'
alias gRu='git remote update'
alias gRp='git remote prune'
alias gRs='git remote show'
alias gRb='git-hub-browse'
# Stash (s)
alias gs='git stash'
alias gsa='git stash apply'
alias gsx='git stash drop'
alias gsX='git-stash-clear-interactive'
alias gsl='git stash list'
alias gsL='git-stash-dropped'
alias gsd='git stash show --patch --stat'
alias gsp='git stash pop'
alias gsr='git-stash-recover'
alias gss='git stash save --include-untracked'
alias gsS='git stash save --patch --no-keep-index'
alias gsw='git stash save --include-untracked --keep-index'
# Submodule (S)
alias gS='git submodule'
alias gSa='git submodule add'
alias gSf='git submodule foreach'
alias gSi='git submodule init'
alias gSI='git submodule update --init --recursive'
alias gSl='git submodule status'
alias gSm='git-submodule-move'
alias gSs='git submodule sync'
alias gSu='git submodule foreach git pull origin master'
alias gSx='git-submodule-remove'
# Working Copy (w)
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
alias gwd='git diff --no-ext-diff'
alias gwD='git diff --no-ext-diff --word-diff'
alias gwr='git reset --soft'
alias gwR='git reset --hard'
alias gwc='git clean -n'
alias gwC='git clean -f'
alias gwx='git rm -r'
alias gwX='git rm -rf'
fi

@ -16,7 +16,7 @@ if [[ -z "$url" ]]; then
fi
if (( $+commands[curl] )); then
curl -s -i 'http://git.io' -F "url=$url" | grep 'Location:' | sed 's/Location: //'
curl -s -i 'http://git.io' -F "url=$url" | sed -n 's/^Location: //p'
else
print "$0: command not found: curl" >&2
fi

@ -1 +1 @@
Subproject commit 7a4b54b708ab88e0421097614f1acaa7a973c795
Subproject commit aae3388491c2312c4efb2e86bcb999927bb2900e

@ -54,4 +54,6 @@ if [[ -n "$key_info" ]]; then
bindkey -M "$keymap" "$key_info[Up]" history-substring-search-up
bindkey -M "$keymap" "$key_info[Down]" history-substring-search-down
done
unset keymap
fi

@ -20,7 +20,7 @@ alias brewC='brew cleanup --force'
alias brewi='brew install'
alias brewl='brew list'
alias brews='brew search'
alias brewu='brew update && brew upgrade --all'
alias brewu='brew update && brew upgrade'
alias brewx='brew remove'
# Homebrew Cask

@ -10,6 +10,13 @@ nvm
[nvm][5] allows for managing multiple, isolated Node.js installations in the
home directory.
nodenv
------
[nodenv][6] does one thing well. nodenv is concerned solely with switching
Node versions. It's simple and predictable, Just Works, and is rock solid in
production. nodenv is forked from the popular [rbenv][7].
Functions
---------
@ -43,3 +50,5 @@ Authors
[3]: http://nodejs.org/api
[4]: https://github.com/sorin-ionescu/prezto/issues
[5]: https://github.com/creationix/nvm
[6]: https://github.com/nodenv/nodenv
[7]: https://github.com/sstephenson/rbenv

@ -15,6 +15,8 @@ typeset -gA node_info
if (( $+functions[nvm_version] )); then
version="${$(nvm_version)#v}"
elif (( $+commands[nodenv] )); then
version="${${$(nodenv version)#v}[(w)0]}"
fi
if [[ "$version" != (none|) ]]; then

@ -14,6 +14,14 @@ if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2>/dev/null)" ]]; then
source $(brew --prefix nvm)/nvm.sh
# Load manually installed nodenv into the shell session.
elif [[ -s "$HOME/.nodenv/bin/nodenv" ]]; then
eval "$($HOME/.nodenv/bin/nodenv init -)"
# Load package manager installed nodenv into the shell session.
elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nodenv 2>/dev/null)" ]]; then
eval "$($(brew --prefix nodenv)/bin/nodenv init -)"
# Return if requirements are not found.
elif (( ! $+commands[node] )); then
return 1

@ -1 +1 @@
Subproject commit 43cb371f361eecf62e9dac7afc73a1c16edf89c7
Subproject commit f8ffdbfbe2c2d8cd1350eae1b68367802fe6df26

@ -1 +1 @@
Subproject commit 8e81152340c4beb2d941340d1feb2dc29bbcc309
Subproject commit c48e4c69ef5c368ea7cda961ed9d0e298a5ae1fc

@ -1 +1 @@
Subproject commit fb4c37dad3c5cbdebca61a8ff5545397c11d450f
Subproject commit 04fa7495cf8fe3aff8ce286d4517df15066b820a

@ -52,6 +52,10 @@ function prompt_paradox_build_prompt {
prompt_paradox_start_segment green black '${(e)git_info[ref]}${(e)git_info[status]}'
fi
if [[ -n "$python_info" ]]; then
prompt_paradox_start_segment white black '${(e)python_info[virtualenv]}'
fi
prompt_paradox_end_segment
}
@ -103,6 +107,7 @@ function prompt_paradox_precmd {
function prompt_paradox_preexec {
_prompt_paradox_start_time="$SECONDS"
python-info
}
function prompt_paradox_setup {
@ -143,6 +148,9 @@ function prompt_paradox_setup {
'ref' '$(coalesce "%b" "%p" "%c")' \
'status' '%s%D%A%B%S%a%d%m%r%U%u'
# %v - virtualenv name.
zstyle ':prezto:module:python:info:virtualenv' format 'virtualenv:%v'
# Define prompts.
PROMPT='
${(e)$(prompt_paradox_build_prompt)}

@ -34,10 +34,11 @@ if (( ! $+commands[python] && ! $+commands[pyenv] )); then
return 1
fi
# Load virtualenvwrapper into the shell session.
if (( $+commands[virtualenvwrapper.sh] )); then
# Load virtualenvwrapper into the shell session, unless requested not to
zstyle -t ':prezto:module:python' skip-virtualenvwrapper-init
if (( $? && $+commands[virtualenvwrapper.sh] )); then
# Set the directory where virtual environments are stored.
export WORKON_HOME="$HOME/.virtualenvs"
export WORKON_HOME="${WORKON_HOME:-$HOME/.virtualenvs}"
# Disable the virtualenv prompt.
VIRTUAL_ENV_DISABLE_PROMPT=1

@ -1 +1 @@
Subproject commit 7044c1986e2f6b15eec27a03651207fccb0a2fbe
Subproject commit 15d4587514a3beaa13972093e335bf685b6726a9

@ -13,14 +13,19 @@ directory, add the following to *zpreztorc*:
zstyle ':prezto:module:terminal' auto-title 'yes'
Auto titling is disabled inside terminal multiplexers, except inside dvtm, since
it interferes with window names defined in configuration files and profile
managers.
Auto titling is disabled inside terminal multiplexers (except inside dvtm)
since it interferes with window names defined in configuration files and
profile managers. This can be overridden by setting it to `always`.
zstyle ':prezto:module:terminal' auto-title 'always'
### Title formats
To format terminal window and tab titles, add the following to *zpreztorc*:
zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
`%s` will be replaced with the current working directory path or the currently
executing program name.
@ -31,7 +36,8 @@ Functions
---------
- `set-tab-title` sets the terminal tab title.
- `set-window-title` sets the terminal or terminal multiplexer window title.
- `set-window-title` sets the terminal window title.
- `set-multiplexer-title` sets the terminal multiplexer title.
Authors
-------
@ -39,6 +45,7 @@ Authors
*The authors of this module should be contacted via the [issue tracker][2].*
- [Sorin Ionescu](https://github.com/sorin-ionescu)
- [Olaf Conradi](https://github.com/oohlaf)
[1]: http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Expansion-of-Prompt-Sequences
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -3,6 +3,7 @@
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
# Olaf Conradi <olaf@conradi.org>
#
# Return if requirements are not found.
@ -10,19 +11,12 @@ if [[ "$TERM" == (dumb|linux|*bsd*|eterm*) ]]; then
return 1
fi
# Sets the terminal or terminal multiplexer window title.
# Sets the terminal window title.
function set-window-title {
local title_format{,ted}
zstyle -s ':prezto:module:terminal:window-title' format 'title_format' || title_format="%s"
zformat -f title_formatted "$title_format" "s:$argv"
if [[ "$TERM" == screen* ]]; then
title_format="\ek%s\e\\"
else
title_format="\e]2;%s\a"
fi
printf "$title_format" "${(V%)title_formatted}"
printf '\e]2;%s\a' "${(V%)title_formatted}"
}
# Sets the terminal tab title.
@ -30,8 +24,15 @@ function set-tab-title {
local title_format{,ted}
zstyle -s ':prezto:module:terminal:tab-title' format 'title_format' || title_format="%s"
zformat -f title_formatted "$title_format" "s:$argv"
printf '\e]1;%s\a' "${(V%)title_formatted}"
}
printf "\e]1;%s\a" ${(V%)title_formatted}
# Sets the terminal multiplexer tab title.
function set-multiplexer-title {
local title_format{,ted}
zstyle -s ':prezto:module:terminal:multiplexer-title' format 'title_format' || title_format="%s"
zformat -f title_formatted "$title_format" "s:$argv"
printf '\ek%s\e\\' "${(V%)title_formatted}"
}
# Sets the tab and window titles with a given command.
@ -59,8 +60,11 @@ function _terminal-set-titles-with-command {
local truncated_cmd="${cmd/(#m)?(#c15,)/${MATCH[1,12]}...}"
unset MATCH
set-window-title "$cmd"
if [[ "$TERM" == screen* ]]; then
set-multiplexer-title "$truncated_cmd"
fi
set-tab-title "$truncated_cmd"
set-window-title "$cmd"
fi
}
@ -74,8 +78,11 @@ function _terminal-set-titles-with-path {
local truncated_path="${abbreviated_path/(#m)?(#c15,)/...${MATCH[-12,-1]}}"
unset MATCH
set-window-title "$abbreviated_path"
if [[ "$TERM" == screen* ]]; then
set-multiplexer-title "$truncated_path"
fi
set-tab-title "$truncated_path"
set-window-title "$abbreviated_path"
}
# Do not override precmd/preexec; append to the hook array.
@ -110,12 +117,13 @@ then
fi
# Set up non-Apple terminals.
if zstyle -t ':prezto:module:terminal' auto-title \
&& ( ! [[ -n "$STY" || -n "$TMUX" ]] )
if zstyle -t ':prezto:module:terminal' auto-title 'always' \
|| (zstyle -t ':prezto:module:terminal' auto-title \
&& ( ! [[ -n "$STY" || -n "$TMUX" ]] ))
then
# Sets the tab and window titles before the prompt is displayed.
# Sets titles before the prompt is displayed.
add-zsh-hook precmd _terminal-set-titles-with-path
# Sets the tab and window titles before command execution.
# Sets titles before command execution.
add-zsh-hook preexec _terminal-set-titles-with-command
fi

@ -75,6 +75,7 @@ Aliases
- `pu` changes the directory and pushes the old directory onto the stack
(`pushd`).
- `rm` removes files and directories interactively.
- `sa` search aliases for a word.
- `type` displays all the attribute values of a shell parameter.
### Files and Directories

@ -8,7 +8,7 @@
function diff {
if zstyle -t ':prezto:module:utility:diff' color; then
if (( $+commands[colordiff] )); then
command diff --unified "$@" | colordiff --difftype diffu
command colordiff --unified "$@"
elif (( $+commands[git] )); then
git --no-pager diff --color=auto --no-ext-diff --no-index "$@"
else

@ -57,6 +57,7 @@ alias p='${(z)PAGER}'
alias po='popd'
alias pu='pushd'
# alias rm="${aliases[rm]:-rm} -i"
alias sa='alias | grep -i'
alias type='type -a'
# ls
@ -158,7 +159,11 @@ fi
# Miscellaneous
# Serves a directory via HTTP.
alias http-serve='python -m SimpleHTTPServer'
if (( $+commands[python3] )); then
alias http-serve='python3 -m http.server'
else
alias http-serve='python -m SimpleHTTPServer'
fi
#
# Functions

@ -153,6 +153,9 @@ zstyle ':prezto:module:prompt' theme 'sorin'
# Set the tab title format.
# zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
# Set the terminal multiplexer title format.
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
#
# Tmux
#

@ -67,8 +67,7 @@ fi
#
if [[ ! -d "$TMPDIR" ]]; then
export TMPDIR="/tmp/$LOGNAME"
mkdir -p -m 700 "$TMPDIR"
export TMPDIR="$(mktemp -d)"
fi
TMPPREFIX="${TMPDIR%/}/zsh"

Loading…
Cancel
Save