1
0
Fork 0

Merge pull request #1 from sorin-ionescu/master

pull new sources
pull/870/head
justin 10 years ago
commit 4e938fca34

@ -86,7 +86,8 @@ License
(The MIT License)
Copyright (c) 2009-2011 Robby Russell and contributors.
Copyright (c) 2011-2014 Sorin Ionescu 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

@ -1 +1 @@
Subproject commit 08afea0e230b5a321d584119f55b675990327ef9
Subproject commit ed964013e290677c866a055e1c1ece6f33f64151

@ -116,7 +116,7 @@ zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
# Kill
zstyle ':completion:*:*:*:*:processes' command 'ps -u $USER -o pid,user,command -w'
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:*:kill:*' force-list always

@ -33,15 +33,6 @@ unsetopt BG_NICE # Don't run all background jobs at a lower priority.
unsetopt HUP # Don't kill jobs on shell exit.
unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
#
# Grep
#
if zstyle -t ':prezto:environment:grep' color; then
export GREP_COLOR='37;45'
export GREP_OPTIONS='--color=auto'
fi
#
# Termcap
#

@ -198,7 +198,7 @@ function git-info {
# Format stashed.
zstyle -s ':prezto:module:git:info:stashed' format 'stashed_format'
if [[ -n "$stashed_format" && -f "${git_dir}/refs/stash" ]]; then
if [[ -n "$stashed_format" && -f "$(git-dir)/refs/stash" ]]; then
stashed="$(git stash list 2> /dev/null | wc -l | awk '{print $1}')"
if [[ -n "$stashed" ]]; then
zformat -f stashed_formatted "$stashed_format" "S:$stashed"

@ -11,16 +11,16 @@ if (( ! $+commands[gpg-agent] )); then
fi
# Set the default paths to gpg-agent files.
_gpg_agent_conf="$HOME/.gnupg/gpg-agent.conf"
_gpg_agent_conf="${GNUPGHOME:-$HOME/.gnupg}/gpg-agent.conf"
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env"
# Start gpg-agent if not started.
if [[ -z "$GPG_AGENT_INFO" ]]; then
if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]]; then
# Export environment variables.
source "$_gpg_agent_env" 2> /dev/null
# Start gpg-agent if not started.
if ! ps -U "$USER" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
fi
fi
@ -35,6 +35,12 @@ if grep 'enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
# Load the SSH module for additional processing.
pmodload 'ssh'
# Updates the GPG-Agent TTY before every command since SSH does not set it.
function _gpg-agent-update-tty {
gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
}
add-zsh-hook preexec _gpg-agent-update-tty
fi
# Clean up.

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

@ -46,7 +46,7 @@ The most basic example of this function can be seen below.
If the `prompt_name_setup` function is customizable via parameters, a help
function **should** be defined. The user will access it via `prompt -h name`.
The most basic example of this function can be seen bellow.
The most basic example of this function can be seen below.
function prompt_name_help {
cat <<EOH
@ -63,7 +63,7 @@ The most basic example of this function can be seen bellow.
If the `prompt_name_setup` function is customizable via parameters, a preview
function **should** be defined. The user will access it via `prompt -p name`.
The most basic example of this function can be seen bellow.
The most basic example of this function can be seen below.
function prompt_name_preview {
if (( $# > 0 )); then
@ -91,7 +91,7 @@ a function before you calling it.
**Do not register hook functions. They will be registered by the `prompt` function.**
The most basic example of this function can be seen bellow.
The most basic example of this function can be seen below.
function prompt_name_precmd {
if (( $+functions[git-info] )); then

@ -1 +1 @@
Subproject commit 2577a4cc078d05c51d9d8e4278b8d16ab348a1b9
Subproject commit e5a55c5469b82da5bd9a9e42b144cef7cec8915b

@ -114,7 +114,7 @@ function prompt_cloud_setup {
'rprompt' ''
# Define prompts.
PROMPT='%B%F{$primary_color}${prefix}%f%b %B%F{$secondary_color}%c%f%b $git_info[prompt] '
PROMPT='%B%F{$primary_color}${prefix}%f%b %B%F{$secondary_color}%c%f%b ${git_info:+${(e)git_info[prompt]}} '
RPROMPT=''
}

@ -58,7 +58,7 @@ function prompt_kylewest_setup {
zstyle ':prezto:module:ruby:info:version' format '%F{blue}[%v]%f'
# Define prompts.
PROMPT='%F{cyan}%c%f ${git_info[prompt]}${editor_info[keymap]} '
PROMPT='%F{cyan}%c%f ${git_info:+${(e)git_info[prompt]}}${editor_info[keymap]} '
RPROMPT='${ruby_info[version]}'
}

@ -18,7 +18,7 @@ pmodload 'helper'
# Define variables.
_prompt_paradox_current_bg='NONE'
_prompt_paradox_segment_separator=''
_prompt_paradox_segment_separator=''
_prompt_paradox_start_time=$SECONDS
function prompt_paradox_start_segment {
@ -129,7 +129,7 @@ function prompt_paradox_setup {
zstyle ':prezto:module:git:info:added' format ' ✚'
zstyle ':prezto:module:git:info:ahead' format ' ⬆'
zstyle ':prezto:module:git:info:behind' format ' ⬇'
zstyle ':prezto:module:git:info:branch' format ' %b'
zstyle ':prezto:module:git:info:branch' format ' %b'
zstyle ':prezto:module:git:info:commit' format '➦ %.7c'
zstyle ':prezto:module:git:info:deleted' format ' ✖'
zstyle ':prezto:module:git:info:dirty' format ' ⁝'

@ -68,7 +68,7 @@ function prompt_skwp_setup {
zstyle ':prezto:module:ruby:info:version' format '[%v]'
# Define prompts.
PROMPT="${_prompt_skwp_colors[3]}%n%f@${_prompt_skwp_colors[2]}%m%f ${_prompt_skwp_colors[5]}%~%f "'$git_info[prompt]'"$ "
PROMPT="${_prompt_skwp_colors[3]}%n%f@${_prompt_skwp_colors[2]}%m%f ${_prompt_skwp_colors[5]}%~%f "'${git_info:+${(e)git_info[prompt]}}'"$ "
RPROMPT='%F{blue}${ruby_info[version]}'
}

@ -57,7 +57,7 @@ function prompt_smiley_setup {
zstyle ':prezto:module:git:info:keys' format 'prompt' '(%b%D)'
# Define prompts.
PROMPT='$python_info[virtualenv]$ruby_info[version]${git_info[prompt]} %B%c%b %(?:%F{green}ツ%f:%F{red}✖%f) '
PROMPT='$python_info[virtualenv]$ruby_info[version]${git_info:+${(e)git_info[prompt]}} %B%c%b %(?:%F{green}ツ%f:%F{red}✖%f) '
RPROMPT='${editor_info[overwrite]}${VIM:+" %B%F{green}V%f%b"}'
SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '
}

@ -25,7 +25,7 @@ if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
source "$_ssh_agent_env" 2> /dev/null
# Start ssh-agent if not started.
if ! ps -U "$USER" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
fi
fi

@ -38,12 +38,12 @@ if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \
fi
# Attach to the 'prezto' session or to the last session used.
exec tmux "$_tmux_iterm_integration" attach-session
exec tmux $_tmux_iterm_integration attach-session
fi
#
# Aliases
#
alias tmuxa="tmux $_tmux_iterm_integration attach-session"
alias tmuxa="tmux $_tmux_iterm_integration new-session -A"
alias tmuxl='tmux list-sessions'

@ -102,6 +102,14 @@ alias lc='lt -c' # Lists sorted by date, most recent last, shows change
alias lu='lt -u' # Lists sorted by date, most recent last, shows access time.
alias sl='ls' # I often screw this up.
# Grep
if zstyle -t ':prezto:module:utility:grep' color; then
export GREP_COLOR='37;45' # BSD.
export GREP_COLORS="mt=$GREP_COLOR" # GNU.
alias grep="$aliases[grep] --color=auto"
fi
# Mac OS X Everywhere
if [[ "$OSTYPE" == darwin* ]]; then
alias o='open'
@ -138,8 +146,13 @@ alias du='du -kh'
if (( $+commands[htop] )); then
alias top=htop
else
if [[ "$OSTYPE" == (darwin*|*bsd*) ]]; then
alias topc='top -o cpu'
alias topm='top -o vsize'
else
alias topc='top -o %CPU'
alias topm='top -o %MEM'
fi
fi
# Miscellaneous
@ -183,5 +196,5 @@ function find-exec {
# Displays user owned processes status.
function psu {
ps -U "${1:-$USER}" -o 'pid,%cpu,%mem,command' "${(@)argv[2,-1]}"
ps -U "${1:-$LOGNAME}" -o 'pid,%cpu,%mem,command' "${(@)argv[2,-1]}"
}

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

Loading…
Cancel
Save