Conflicts: modules/prompt/functions/prompt_pure_setuppull/789/head
commit
244aa3b321
@ -0,0 +1 @@
|
||||
Subproject commit 43cb371f361eecf62e9dac7afc73a1c16edf89c7
|
@ -0,0 +1 @@
|
||||
Subproject commit 8e81152340c4beb2d941340d1feb2dc29bbcc309
|
@ -0,0 +1 @@
|
||||
Subproject commit 2577a4cc078d05c51d9d8e4278b8d16ab348a1b9
|
@ -0,0 +1 @@
|
||||
../external/agnoster/agnoster.zsh-theme
|
@ -0,0 +1,121 @@
|
||||
#
|
||||
# A minimal two-color theme.
|
||||
#
|
||||
# Authors:
|
||||
# Kevin Laude <nerfyoda@gmail.com>
|
||||
#
|
||||
# Features:
|
||||
# - One line, left aligned.
|
||||
# - The prompt is prefixed by a character sequence of your choice.
|
||||
# - Only displays the current directory instead of the full path.
|
||||
# - Displays the current branch when in a git project (this requires loading
|
||||
# the git module before prompt in ~/.zpreztorc).
|
||||
# - Displays a character at the end of the prompt when in a git project with
|
||||
# "dirty" files.
|
||||
#
|
||||
# Usage:
|
||||
# This prompt's prefix symbol and colors are customizable:
|
||||
# prompt cloud [<symbol>] [<color1>] [<color2>]
|
||||
#
|
||||
# In ~/.zpreztorc:
|
||||
# zstyle ':prezto:module:prompt' theme 'cloud' \
|
||||
# ['<symbol>'] \
|
||||
# ['<color1>'] \
|
||||
# ['<color2>']
|
||||
#
|
||||
# If these options are not provided, the symbol defaults to "☁" with colors
|
||||
# cyan and green.
|
||||
#
|
||||
# Screenshots:
|
||||
# http://i.imgur.com/mJCZ8rE.png
|
||||
#
|
||||
# Note:
|
||||
# This is a port of the oh-my-zsh cloud theme, originally written by Phillip
|
||||
# Ridlen <p@rdln.net> and Mark Drago <markdrago@gmail.com>
|
||||
#
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
function prompt_cloud_precmd {
|
||||
setopt LOCAL_OPTIONS
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
|
||||
# Get Git repository information.
|
||||
if (( $+functions[git-info] )); then
|
||||
git-info
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_cloud_help {
|
||||
cat <<EOT
|
||||
This prompt's prefix symbol and colors are customizable:
|
||||
|
||||
prompt cloud [<symbol>] [<color1>] [<color2>]
|
||||
|
||||
In ~/.zpreztorc:
|
||||
zstyle ':prezto:module:prompt' theme 'cloud' ['<symbol>'] ['<color1>'] ['<color2>']
|
||||
|
||||
If these options are not provided, the symbol defaults to ☁ with colors cyan
|
||||
and green.
|
||||
EOT
|
||||
}
|
||||
|
||||
function prompt_cloud_preview {
|
||||
if (( $# > 0 )); then
|
||||
prompt_preview_theme 'cloud' "$@"
|
||||
else
|
||||
prompt_preview_theme 'cloud'
|
||||
print
|
||||
prompt_preview_theme 'cloud' "✯"
|
||||
print
|
||||
prompt_preview_theme 'cloud' ">" "yellow" "red"
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_cloud_setup {
|
||||
setopt LOCAL_OPTIONS
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
prompt_opts=(cr percent subst)
|
||||
|
||||
# Set the theme prefix to a cloud or to the user's given characters.
|
||||
if [[ -n "$1" ]]; then
|
||||
prefix="$1"
|
||||
else
|
||||
prefix='☁'
|
||||
fi
|
||||
|
||||
# Assign colors.
|
||||
if [[ -n "$2" ]]; then
|
||||
primary_color="$2"
|
||||
else
|
||||
primary_color='cyan'
|
||||
fi
|
||||
|
||||
if [[ -n "$3" ]]; then
|
||||
secondary_color="$3"
|
||||
else
|
||||
secondary_color='green'
|
||||
fi
|
||||
|
||||
# Load required functions.
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Add hook for calling git-info before each command.
|
||||
add-zsh-hook precmd prompt_cloud_precmd
|
||||
|
||||
# Set git-info parameters.
|
||||
zstyle ':prezto:module:git:info' verbose 'yes'
|
||||
zstyle ':prezto:module:git:info:dirty' format "%%B%F{$secondary_color}]%f%%b %F{yellow}⚡%f"
|
||||
zstyle ':prezto:module:git:info:clean' format "%B%F{$secondary_color}]%f%b"
|
||||
zstyle ':prezto:module:git:info:branch' format "%%B%F{$secondary_color}[%f%%b%%B%F{$primary_color}%b%f%%b"
|
||||
zstyle ':prezto:module:git:info:keys' format \
|
||||
'prompt' '%b%C%D' \
|
||||
'rprompt' ''
|
||||
|
||||
# Define prompts.
|
||||
PROMPT='%B%F{$primary_color}${prefix}%f%b %B%F{$secondary_color}%c%f%b $git_info[prompt] '
|
||||
RPROMPT=''
|
||||
}
|
||||
|
||||
prompt_cloud_setup "$@"
|
@ -0,0 +1,76 @@
|
||||
#
|
||||
# A simple theme inspired by the Sorin and PeepCode themes.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel Møller Kristensen <damoekri@icloud.com>
|
||||
#
|
||||
# Screenshots:
|
||||
# http://i.imgur.com/AX9HnPF.png
|
||||
#
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
function prompt_damoekri_pwd {
|
||||
local pwd="${PWD/#$HOME/~}"
|
||||
|
||||
if [[ "$pwd" == (#m)[/~] ]]; then
|
||||
_prompt_damoekri_pwd="$MATCH"
|
||||
unset MATCH
|
||||
else
|
||||
_prompt_damoekri_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}"
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_damoekri_precmd {
|
||||
setopt LOCAL_OPTIONS
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
|
||||
# Format PWD.
|
||||
prompt_damoekri_pwd
|
||||
|
||||
# Get Git repository information.
|
||||
if (( $+functions[git-info] )); then
|
||||
git-info
|
||||
fi
|
||||
|
||||
# Get Ruby version information.
|
||||
if (( $+functions[ruby-info] )); then
|
||||
ruby-info
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_damoekri_setup {
|
||||
setopt LOCAL_OPTIONS
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
prompt_opts=(cr percent subst)
|
||||
|
||||
# Load required functions.
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Add hook for calling git-info and ruby-info before each command.
|
||||
add-zsh-hook precmd prompt_damoekri_precmd
|
||||
|
||||
# Set editor-info parameters.
|
||||
zstyle ':prezto:module:editor:info:keymap:primary' format ' %F{green}»%f'
|
||||
|
||||
# Set git-info parameters.
|
||||
zstyle ':prezto:module:git:info' verbose 'yes'
|
||||
zstyle ':prezto:module:git:info:action' format ':%F{magenta}%s%f'
|
||||
zstyle ':prezto:module:git:info:branch' format '%F{blue}%b%f'
|
||||
zstyle ':prezto:module:git:info:clean' format ' %F{green}✔%f'
|
||||
zstyle ':prezto:module:git:info:dirty' format ' %F{red}✗%f'
|
||||
zstyle ':prezto:module:git:info:commit' format '%F{blue}%.7c%f'
|
||||
zstyle ':prezto:module:git:info:position' format '%F{blue}%p%f'
|
||||
zstyle ':prezto:module:git:info:keys' format \
|
||||
'rprompt' ' $(coalesce "%b" "%p" "%c")%s%C%D'
|
||||
|
||||
# Set ruby-info parameters.
|
||||
zstyle ':prezto:module:ruby:info:version' format ' %F{yellow}%v%f'
|
||||
|
||||
# Define prompts.
|
||||
PROMPT='%F{cyan}${_prompt_damoekri_pwd}%f${editor_info[keymap]} '
|
||||
RPROMPT='${git_info:+${(e)git_info[rprompt]}}${ruby_info:+${ruby_info[version]}}'
|
||||
}
|
||||
|
||||
prompt_damoekri_setup "$@"
|
@ -0,0 +1,76 @@
|
||||
#
|
||||
# A colorful, friendly, multiline theme with some handy features.
|
||||
#
|
||||
# Authors:
|
||||
# Paul Gideon Dann <pdgiddie@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
# Features:
|
||||
# - Simple VCS branch, staged, and unstaged indication.
|
||||
# - Prompt character is different in a VCS repository.
|
||||
# - Last command exit status is displayed when non-zero.
|
||||
#
|
||||
# Screenshots:
|
||||
# http://i.imgur.com/rCo3S.png
|
||||
#
|
||||
|
||||
function +vi-set_novcs_prompt_symbol {
|
||||
_prompt_giddie_symbol=')'
|
||||
}
|
||||
|
||||
function +vi-set_vcs_prompt_symbol {
|
||||
_prompt_giddie_symbol='±'
|
||||
}
|
||||
|
||||
function +vi-git_precmd {
|
||||
# Check for untracked files, since vcs_info does not.
|
||||
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
|
||||
hook_com[unstaged]+='%F{green}?%f'
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_giddie_precmd {
|
||||
# Replace '/home/<user>' with '~'.
|
||||
_prompt_giddie_pwd="${PWD/#$HOME/~}"
|
||||
vcs_info
|
||||
}
|
||||
|
||||
function prompt_giddie_setup {
|
||||
setopt LOCAL_OPTIONS
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
prompt_opts=(cr percent subst)
|
||||
|
||||
# Load required functions.
|
||||
autoload -Uz vcs_info
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Add hook to set up prompt parameters before each command.
|
||||
add-zsh-hook precmd prompt_giddie_precmd
|
||||
|
||||
# Set editor-info parameters.
|
||||
zstyle ':prezto:module:editor:info:completing' format '%F{green}...%f'
|
||||
zstyle ':prezto:module:editor:info:keymap:alternate' format '%F{yellow}--- COMMAND ---%f'
|
||||
|
||||
# Set vcs_info parameters.
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' formats ' on %F{magenta}%b%f%c%u'
|
||||
zstyle ':vcs_info:*' actionformats ' on %F{magenta}%b%f%c%u %F{yellow}(%a)%f'
|
||||
zstyle ':vcs_info:*' stagedstr '%F{green}+%f'
|
||||
zstyle ':vcs_info:*' unstagedstr '%F{green}!%f'
|
||||
|
||||
# Set vcs_info hooks.
|
||||
# NOTE: Prior to Zsh v4.3.12, there are no static hooks, no vcs_info_hookadd
|
||||
# function, and no 'no-vcs' hook.
|
||||
zstyle ':vcs_info:*+start-up:*' hooks set_novcs_prompt_symbol
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks set_vcs_prompt_symbol git_precmd
|
||||
zstyle ':vcs_info:*+set-message:*' hooks set_vcs_prompt_symbol
|
||||
|
||||
# Define prompts.
|
||||
PROMPT='%(?..%F{red}%B-> [%?]%b%f
|
||||
)%F{magenta}%n%f@%F{yellow}%m%f|%F{green}${_prompt_giddie_pwd}%f${vcs_info_msg_0_}
|
||||
%F{blue}${_prompt_giddie_symbol}%f '
|
||||
RPROMPT='${editor_info[keymap]}'
|
||||
SPROMPT='zsh: correct %F{magenta}%R%f to %F{green}%r%f [nyae]? '
|
||||
}
|
||||
|
||||
prompt_giddie_setup "$@"
|
@ -0,0 +1 @@
|
||||
../external/powerline/prompt_powerline_setup
|
@ -0,0 +1 @@
|
||||
../external/pure/pure.zsh
|
@ -0,0 +1,75 @@
|
||||
#
|
||||
# A single line theme with Git information on the left and Ruby on the right.
|
||||
#
|
||||
# Authors:
|
||||
# Steve Losh <steve@stevelosh.com>
|
||||
# Bart Trojanowski <bart@jukie.net>
|
||||
# Brian Carper <brian@carper.ca>
|
||||
# steeef <steeef@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
# Yan Pritzker <yan@pritzker.ws>
|
||||
#
|
||||
# Screenshots:
|
||||
# http://i.imgur.com/gLgVp6Y.png
|
||||
#
|
||||
|
||||
function prompt_skwp_precmd {
|
||||
# Get Git repository information.
|
||||
if (( $+functions[git-info] )); then
|
||||
git-info
|
||||
fi
|
||||
|
||||
# Get Ruby information.
|
||||
if (( $+functions[ruby-info] )); then
|
||||
ruby-info
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_skwp_setup {
|
||||
setopt LOCAL_OPTIONS
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
prompt_opts=(cr percent subst)
|
||||
|
||||
# Load required functions.
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Add hook to set up prompt parameters before each command.
|
||||
add-zsh-hook precmd prompt_skwp_precmd
|
||||
|
||||
# Use extended color pallete if available.
|
||||
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
|
||||
_prompt_skwp_colors=(
|
||||
"%F{81}" # Turquoise
|
||||
"%F{166}" # Orange
|
||||
"%F{135}" # Purple
|
||||
"%F{161}" # Hotpink
|
||||
"%F{118}" # Limegreen
|
||||
)
|
||||
else
|
||||
_prompt_skwp_colors=(
|
||||
"%F{cyan}"
|
||||
"%F{yellow}"
|
||||
"%F{magenta}"
|
||||
"%F{red}"
|
||||
"%F{green}"
|
||||
)
|
||||
fi
|
||||
|
||||
# Set git-info parameters.
|
||||
zstyle ':prezto:module:git:info' verbose 'yes'
|
||||
zstyle ':prezto:module:git:info:branch' format "${_prompt_skwp_colors[1]}%b%f"
|
||||
zstyle ':prezto:module:git:info:added' format "${_prompt_skwp_colors[5]}●%f"
|
||||
zstyle ':prezto:module:git:info:deleted' format "${_prompt_skwp_colors[2]}●%f"
|
||||
zstyle ':prezto:module:git:info:modified' format "${_prompt_skwp_colors[4]}●%f"
|
||||
zstyle ':prezto:module:git:info:untracked' format "${_prompt_skwp_colors[3]}●%f"
|
||||
zstyle ':prezto:module:git:info:keys' format 'prompt' '(%b%d%a%m%u)'
|
||||
|
||||
# Set ruby-info parameters.
|
||||
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]'"$ "
|
||||
RPROMPT='%F{blue}${ruby_info[version]}'
|
||||
}
|
||||
|
||||
prompt_skwp_setup "$@"
|
@ -0,0 +1,65 @@
|
||||
#
|
||||
# A simple theme that displays:
|
||||
# - Python virtual environment.
|
||||
# - Git branch.
|
||||
# - Git state.
|
||||
# - Last command exit state (smiley/X).
|
||||
#
|
||||
# Authors:
|
||||
# Nadav Shatz <nadavshatz@gmail.com>
|
||||
#
|
||||
# Screenshots:
|
||||
# http://i.imgur.com/ijycV6n.png
|
||||
#
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
function prompt_smiley_precmd {
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
|
||||
# Get Git repository information.
|
||||
if (( $+functions[git-info] )); then
|
||||
git-info
|
||||
fi
|
||||
|
||||
# Get Python environment information.
|
||||
if (( $+functions[python-info] )); then
|
||||
python-info
|
||||
fi
|
||||
|
||||
# Get Ruby version information.
|
||||
if (( $+functions[ruby-info] )); then
|
||||
ruby-info
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_smiley_setup {
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
prompt_opts=(percent subst)
|
||||
|
||||
# Add hook for calling git-info before each command.
|
||||
add-zsh-hook precmd prompt_smiley_precmd
|
||||
|
||||
# Set editor-info parameters.
|
||||
zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b'
|
||||
|
||||
# Set python-info parameters.
|
||||
zstyle ':prezto:module:python:info:virtualenv' format '%F{yellow}[%v]%f '
|
||||
|
||||
# Set ruby-info parameters.
|
||||
zstyle ':prezto:module:ruby:info:version' format '%F{yellow}[%v]%f '
|
||||
|
||||
# Set git-info parameters.
|
||||
zstyle ':prezto:module:git:info' verbose 'yes'
|
||||
zstyle ':prezto:module:git:info:branch' format '%F{blue}%b%f'
|
||||
zstyle ':prezto:module:git:info:dirty' format '%%B%F{red} ±%f%%b'
|
||||
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) '
|
||||
RPROMPT='${editor_info[overwrite]}${VIM:+" %B%F{green}V%f%b"}'
|
||||
SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '
|
||||
}
|
||||
|
||||
prompt_smiley_setup "$@"
|
Loading…
Reference in new issue