1
0
Fork 0

Merge branch 'master' into paradox_virtualenv

pull/1143/head
Patrick Bos 8 years ago committed by GitHub
commit 1929b5ecd7

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"] [submodule "modules/history-substring-search/external"]
path = modules/history-substring-search/external path = modules/history-substring-search/external
url = https://github.com/zsh-users/zsh-history-substring-search.git url = https://github.com/zsh-users/zsh-history-substring-search.git
@ -16,6 +19,3 @@
[submodule "modules/prompt/functions/pure"] [submodule "modules/prompt/functions/pure"]
path = modules/prompt/external/pure path = modules/prompt/external/pure
url = https://github.com/sindresorhus/pure.git 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: 1. Launch Zsh:
zsh `zsh`
2. Clone the repository: 2. Clone the repository:
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" `git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"`
3. Create a new Zsh configuration by copying the Zsh configuration files 3. Create a new Zsh configuration by copying the Zsh configuration files
provided: provided:
```
setopt EXTENDED_GLOB setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done done
```
4. Set Zsh as your default shell: 4. Set Zsh as your default shell:
chsh -s /bin/zsh `chsh -s /bin/zsh`
5. Open a new Zsh terminal window or tab. 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 License
------- -------
(The MIT License) This project is licensed under 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.
[1]: http://www.zsh.org [1]: http://www.zsh.org
[2]: http://i.imgur.com/nrGV6pg.png "sorin theme" [2]: http://i.imgur.com/nrGV6pg.png "sorin theme"

@ -25,13 +25,13 @@ unset min_zsh_version
function pmodload { function pmodload {
local -a pmodules local -a pmodules
local pmodule 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. # $argv is overridden in the anonymous function.
pmodules=("$argv[@]") pmodules=("$argv[@]")
# Add functions to $fpath. # Add functions to $fpath.
fpath=(${pmodules:+${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions(/FN)} $fpath) fpath=(${pmodules:+$ZPREZTODIR/modules/${^pmodules}/functions(/FN)} $fpath)
function { function {
local pfunction local pfunction
@ -40,7 +40,7 @@ function pmodload {
setopt LOCAL_OPTIONS EXTENDED_GLOB setopt LOCAL_OPTIONS EXTENDED_GLOB
# Load Prezto functions. # 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" autoload -Uz "$pfunction"
done done
} }
@ -49,19 +49,19 @@ function pmodload {
for pmodule in "$pmodules[@]"; do for pmodule in "$pmodules[@]"; do
if zstyle -t ":prezto:module:$pmodule" loaded 'yes' 'no'; then if zstyle -t ":prezto:module:$pmodule" loaded 'yes' 'no'; then
continue continue
elif [[ ! -d "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule" ]]; then elif [[ ! -d "$ZPREZTODIR/modules/$pmodule" ]]; then
print "$0: no such module: $pmodule" >&2 print "$0: no such module: $pmodule" >&2
continue continue
else else
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/init.zsh" ]]; then if [[ -s "$ZPREZTODIR/modules/$pmodule/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/init.zsh" source "$ZPREZTODIR/modules/$pmodule/init.zsh"
fi fi
if (( $? == 0 )); then if (( $? == 0 )); then
zstyle ":prezto:module:$pmodule" loaded 'yes' zstyle ":prezto:module:$pmodule" loaded 'yes'
else else
# Remove the $fpath entry. # Remove the $fpath entry.
fpath[(r)${ZDOTDIR:-$HOME}/.zprezto/modules/${pmodule}/functions]=() fpath[(r)${ZPREZTODIR}/modules/${pmodule}/functions]=()
function { function {
local pfunction local pfunction
@ -71,7 +71,7 @@ function pmodload {
setopt LOCAL_OPTIONS EXTENDED_GLOB setopt LOCAL_OPTIONS EXTENDED_GLOB
# Unload Prezto functions. # 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" unfunction "$pfunction"
done done
} }
@ -86,6 +86,12 @@ function pmodload {
# Prezto Initialization # 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. # Source the Prezto configuration file.
if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then
source "${ZDOTDIR:-$HOME}/.zpreztorc" 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' alias deb-build='time dpkg-buildpackage -rfakeroot -us -uc'
# Removes all kernel images and headers, except for the ones in use. # 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 print "prezto: editor: invalid key bindings: $key_bindings" >&2
fi 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
------- -------
Aliases are enabled by default. You can disable them with:
zstyle ':prezto:module:git:alias' skip 'yes'
### Git ### Git
- `g` is short for `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]. - `gpt` shadows the [GUID partition table maintenance utility][4].
- `gs` shadows the [Ghostscript][5]. - `gs` shadows the [Ghostscript][5].
- `gb` shadows the [GB][9].
If you frequently use the above commands, you may wish to remove said aliases 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`. 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 [6]: https://github.com/sorin-ionescu/prezto/issues
[7]: https://github.com/sorin-ionescu/prezto/issues/219 [7]: https://github.com/sorin-ionescu/prezto/issues/219
[8]: http://www.kernel.org/pub/software/scm/git/docs/git-log.html [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 # Aliases
# #
# Git if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then
alias g='git' # Git
alias g='git'
# Branch (b)
alias gb='git branch' # Branch (b)
alias gbc='git checkout -b' alias gb='git branch'
alias gbl='git branch -v' alias gbc='git checkout -b'
alias gbL='git branch -av' alias gbl='git branch -v'
alias gbx='git branch -d' alias gbL='git branch -av'
alias gbX='git branch -D' alias gbx='git branch -d'
alias gbm='git branch -m' alias gbX='git branch -D'
alias gbM='git branch -M' alias gbm='git branch -m'
alias gbs='git show-branch' alias gbM='git branch -M'
alias gbS='git show-branch -a' alias gbs='git show-branch'
alias gbS='git show-branch -a'
# Commit (c)
alias gc='git commit --verbose' # Commit (c)
alias gca='git commit --verbose --all' alias gc='git commit --verbose'
alias gcm='git commit --message' alias gca='git commit --verbose --all'
alias gco='git checkout' alias gcm='git commit --message'
alias gcO='git checkout --patch' alias gco='git checkout'
alias gcf='git commit --amend --reuse-message HEAD' alias gcO='git checkout --patch'
alias gcF='git commit --verbose --amend' alias gcf='git commit --amend --reuse-message HEAD'
alias gcp='git cherry-pick --ff' alias gcF='git commit --verbose --amend'
alias gcP='git cherry-pick --no-commit' alias gcp='git cherry-pick --ff'
alias gcr='git revert' alias gcP='git cherry-pick --no-commit'
alias gcR='git reset "HEAD^"' alias gcr='git revert'
alias gcs='git show' alias gcR='git reset "HEAD^"'
alias gcl='git-commit-lost' alias gcs='git show'
alias gcl='git-commit-lost'
# Conflict (C)
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"' # Conflict (C)
alias gCa='git add $(gCl)' alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
alias gCe='git mergetool $(gCl)' alias gCa='git add $(gCl)'
alias gCo='git checkout --ours --' alias gCe='git mergetool $(gCl)'
alias gCO='gCo $(gCl)' alias gCo='git checkout --ours --'
alias gCt='git checkout --theirs --' alias gCO='gCo $(gCl)'
alias gCT='gCt $(gCl)' alias gCt='git checkout --theirs --'
alias gCT='gCt $(gCl)'
# Data (d)
alias gd='git ls-files' # Data (d)
alias gdc='git ls-files --cached' alias gd='git ls-files'
alias gdx='git ls-files --deleted' alias gdc='git ls-files --cached'
alias gdm='git ls-files --modified' alias gdx='git ls-files --deleted'
alias gdu='git ls-files --other --exclude-standard' alias gdm='git ls-files --modified'
alias gdk='git ls-files --killed' alias gdu='git ls-files --other --exclude-standard'
alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"' alias gdk='git ls-files --killed'
alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"'
# Fetch (f)
alias gf='git fetch' # Fetch (f)
alias gfc='git clone' alias gf='git fetch'
alias gfm='git pull' alias gfc='git clone'
alias gfr='git pull --rebase' alias gfm='git pull'
alias gfr='git pull --rebase'
# Grep (g)
alias gg='git grep' # Grep (g)
alias ggi='git grep --ignore-case' alias gg='git grep'
alias ggl='git grep --files-with-matches' alias ggi='git grep --ignore-case'
alias ggL='git grep --files-without-matches' alias ggl='git grep --files-with-matches'
alias ggv='git grep --invert-match' alias ggL='git grep --files-without-matches'
alias ggw='git grep --word-regexp' alias ggv='git grep --invert-match'
alias ggw='git grep --word-regexp'
# Index (i)
alias gia='git add' # Index (i)
alias giA='git add --patch' alias gia='git add'
alias giu='git add --update' alias giA='git add --patch'
alias gid='git diff --no-ext-diff --cached' alias giu='git add --update'
alias giD='git diff --no-ext-diff --cached --word-diff' alias gid='git diff --no-ext-diff --cached'
alias gir='git reset' alias giD='git diff --no-ext-diff --cached --word-diff'
alias giR='git reset --patch' alias gir='git reset'
alias gix='git rm -r --cached' alias giR='git reset --patch'
alias giX='git rm -rf --cached' 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}"' # Log (l)
alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"' alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"' alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"'
alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"' alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"' alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"'
alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"' alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"'
alias glc='git shortlog --summary --numbered' alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
alias glc='git shortlog --summary --numbered'
# Merge (m)
alias gm='git merge' # Merge (m)
alias gmC='git merge --no-commit' alias gm='git merge'
alias gmF='git merge --no-ff' alias gmC='git merge --no-commit'
alias gma='git merge --abort' alias gmF='git merge --no-ff'
alias gmt='git mergetool' alias gma='git merge --abort'
alias gmt='git mergetool'
# Push (p)
alias gp='git push' # Push (p)
alias gpf='git push --force' alias gp='git push'
alias gpa='git push --all' alias gpf='git push --force-with-lease'
alias gpA='git push --all && git push --tags' alias gpF='git push --force'
alias gpt='git push --tags' alias gpa='git push --all'
alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"' alias gpA='git push --all && git push --tags'
alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"' alias gpt='git push --tags'
alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"'
# Rebase (r) alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"'
alias gr='git rebase'
alias gra='git rebase --abort' # Rebase (r)
alias grc='git rebase --continue' alias gr='git rebase'
alias gri='git rebase --interactive' alias gra='git rebase --abort'
alias grs='git rebase --skip' alias grc='git rebase --continue'
alias gri='git rebase --interactive'
# Remote (R) alias grs='git rebase --skip'
alias gR='git remote'
alias gRl='git remote --verbose' # Remote (R)
alias gRa='git remote add' alias gR='git remote'
alias gRx='git remote rm' alias gRl='git remote --verbose'
alias gRm='git remote rename' alias gRa='git remote add'
alias gRu='git remote update' alias gRx='git remote rm'
alias gRp='git remote prune' alias gRm='git remote rename'
alias gRs='git remote show' alias gRu='git remote update'
alias gRb='git-hub-browse' alias gRp='git remote prune'
alias gRs='git remote show'
# Stash (s) alias gRb='git-hub-browse'
alias gs='git stash'
alias gsa='git stash apply' # Stash (s)
alias gsx='git stash drop' alias gs='git stash'
alias gsX='git-stash-clear-interactive' alias gsa='git stash apply'
alias gsl='git stash list' alias gsx='git stash drop'
alias gsL='git-stash-dropped' alias gsX='git-stash-clear-interactive'
alias gsd='git stash show --patch --stat' alias gsl='git stash list'
alias gsp='git stash pop' alias gsL='git-stash-dropped'
alias gsr='git-stash-recover' alias gsd='git stash show --patch --stat'
alias gss='git stash save --include-untracked' alias gsp='git stash pop'
alias gsS='git stash save --patch --no-keep-index' alias gsr='git-stash-recover'
alias gsw='git stash save --include-untracked --keep-index' alias gss='git stash save --include-untracked'
alias gsS='git stash save --patch --no-keep-index'
# Submodule (S) alias gsw='git stash save --include-untracked --keep-index'
alias gS='git submodule'
alias gSa='git submodule add' # Submodule (S)
alias gSf='git submodule foreach' alias gS='git submodule'
alias gSi='git submodule init' alias gSa='git submodule add'
alias gSI='git submodule update --init --recursive' alias gSf='git submodule foreach'
alias gSl='git submodule status' alias gSi='git submodule init'
alias gSm='git-submodule-move' alias gSI='git submodule update --init --recursive'
alias gSs='git submodule sync' alias gSl='git submodule status'
alias gSu='git submodule foreach git pull origin master' alias gSm='git-submodule-move'
alias gSx='git-submodule-remove' alias gSs='git submodule sync'
alias gSu='git submodule foreach git pull origin master'
# Working Copy (w) alias gSx='git-submodule-remove'
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}' # Working Copy (w)
alias gwd='git diff --no-ext-diff' alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
alias gwD='git diff --no-ext-diff --word-diff' alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
alias gwr='git reset --soft' alias gwd='git diff --no-ext-diff'
alias gwR='git reset --hard' alias gwD='git diff --no-ext-diff --word-diff'
alias gwc='git clean -n' alias gwr='git reset --soft'
alias gwC='git clean -f' alias gwR='git reset --hard'
alias gwx='git rm -r' alias gwc='git clean -n'
alias gwX='git rm -rf' 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 fi
if (( $+commands[curl] )); then 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 else
print "$0: command not found: curl" >&2 print "$0: command not found: curl" >&2
fi 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[Up]" history-substring-search-up
bindkey -M "$keymap" "$key_info[Down]" history-substring-search-down bindkey -M "$keymap" "$key_info[Down]" history-substring-search-down
done done
unset keymap
fi fi

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

@ -10,6 +10,13 @@ nvm
[nvm][5] allows for managing multiple, isolated Node.js installations in the [nvm][5] allows for managing multiple, isolated Node.js installations in the
home directory. 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 Functions
--------- ---------
@ -43,3 +50,5 @@ Authors
[3]: http://nodejs.org/api [3]: http://nodejs.org/api
[4]: https://github.com/sorin-ionescu/prezto/issues [4]: https://github.com/sorin-ionescu/prezto/issues
[5]: https://github.com/creationix/nvm [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 if (( $+functions[nvm_version] )); then
version="${$(nvm_version)#v}" version="${$(nvm_version)#v}"
elif (( $+commands[nodenv] )); then
version="${${$(nodenv version)#v}[(w)0]}"
fi fi
if [[ "$version" != (none|) ]]; then 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 elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2>/dev/null)" ]]; then
source $(brew --prefix nvm)/nvm.sh 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. # Return if requirements are not found.
elif (( ! $+commands[node] )); then elif (( ! $+commands[node] )); then
return 1 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

@ -57,6 +57,10 @@ function prompt_paradox_build_prompt {
prompt_paradox_start_segment green black '${(e)git_info[ref]}${(e)git_info[status]}' prompt_paradox_start_segment green black '${(e)git_info[ref]}${(e)git_info[status]}'
fi fi
if [[ -n "$python_info" ]]; then
prompt_paradox_start_segment white black '${(e)python_info[virtualenv]}'
fi
prompt_paradox_end_segment prompt_paradox_end_segment
} }
@ -113,6 +117,7 @@ function prompt_paradox_precmd {
function prompt_paradox_preexec { function prompt_paradox_preexec {
_prompt_paradox_start_time="$SECONDS" _prompt_paradox_start_time="$SECONDS"
python-info
} }
function prompt_paradox_setup { function prompt_paradox_setup {

@ -34,10 +34,11 @@ if (( ! $+commands[python] && ! $+commands[pyenv] )); then
return 1 return 1
fi fi
# Load virtualenvwrapper into the shell session. # Load virtualenvwrapper into the shell session, unless requested not to
if (( $+commands[virtualenvwrapper.sh] )); then zstyle -t ':prezto:module:python' skip-virtualenvwrapper-init
if (( $? && $+commands[virtualenvwrapper.sh] )); then
# Set the directory where virtual environments are stored. # Set the directory where virtual environments are stored.
export WORKON_HOME="$HOME/.virtualenvs" export WORKON_HOME="${WORKON_HOME:-$HOME/.virtualenvs}"
# Disable the virtualenv prompt. # Disable the virtualenv prompt.
VIRTUAL_ENV_DISABLE_PROMPT=1 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' zstyle ':prezto:module:terminal' auto-title 'yes'
Auto titling is disabled inside terminal multiplexers, except inside dvtm, since Auto titling is disabled inside terminal multiplexers (except inside dvtm)
it interferes with window names defined in configuration files and profile since it interferes with window names defined in configuration files and
managers. 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*: 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:window-title' format '%n@%m: %s'
zstyle ':prezto:module:terminal:tab-title' format '%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 `%s` will be replaced with the current working directory path or the currently
executing program name. executing program name.
@ -31,7 +36,8 @@ Functions
--------- ---------
- `set-tab-title` sets the terminal tab title. - `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 Authors
------- -------
@ -39,6 +45,7 @@ Authors
*The authors of this module should be contacted via the [issue tracker][2].* *The authors of this module should be contacted via the [issue tracker][2].*
- [Sorin Ionescu](https://github.com/sorin-ionescu) - [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 [1]: http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Expansion-of-Prompt-Sequences
[2]: https://github.com/sorin-ionescu/prezto/issues [2]: https://github.com/sorin-ionescu/prezto/issues

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

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

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

@ -57,6 +57,7 @@ alias p='${(z)PAGER}'
alias po='popd' alias po='popd'
alias pu='pushd' alias pu='pushd'
alias rm="${aliases[rm]:-rm} -i" alias rm="${aliases[rm]:-rm} -i"
alias sa='alias | grep -i'
alias type='type -a' alias type='type -a'
# ls # ls
@ -158,7 +159,11 @@ fi
# Miscellaneous # Miscellaneous
# Serves a directory via HTTP. # 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 # Functions

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

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

Loading…
Cancel
Save