Prezto support! Make sure you run rake:install
This commit is contained in:
4
zsh/0000_before.zsh
Normal file
4
zsh/0000_before.zsh
Normal file
@@ -0,0 +1,4 @@
|
||||
# Load any user customizations prior to load
|
||||
if [ -d $HOME/.zsh.before/ ]; then
|
||||
for config_file ($HOME/.zsh.before/*.zsh) source $config_file
|
||||
fi
|
||||
@@ -1,3 +1,3 @@
|
||||
# path, the 0 in the filename causes this to load first
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:$PATH:$yadr/bin:$yadr/bin/yadr
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:$PATH:$HOME/.yadr/bin:$HOME/.yadr/bin/yadr
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ alias gunc='git uncommit'
|
||||
alias gm='git merge'
|
||||
alias gms='git merge --squash'
|
||||
alias gam='git amend --reset-author'
|
||||
alias grv='git remote -v'
|
||||
alias gr='git rebase'
|
||||
alias gra='git rebase --abort'
|
||||
alias ggrc='git rebase --continue'
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# Set the path to Oh My Zsh.
|
||||
export OMZ="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set the key mapping style to 'emacs' or 'vi'.
|
||||
# zstyle ':omz:module:editor' keymap 'vi'
|
||||
|
||||
# Auto convert .... to ../..
|
||||
zstyle ':omz:module:editor' dot-expansion 'no'
|
||||
|
||||
# Set case-sensitivity for completion, history lookup, etc.
|
||||
zstyle ':omz:*:*' case-sensitive 'no'
|
||||
|
||||
# Color output (auto set to 'no' on dumb terminals).
|
||||
zstyle ':omz:*:*' color 'yes'
|
||||
|
||||
# Auto set the tab and window titles.
|
||||
zstyle ':omz:module:terminal' auto-title 'yes'
|
||||
|
||||
# Set the Zsh modules to load (man zshmodules).
|
||||
# zstyle ':omz:load' zmodule 'attr' 'stat'
|
||||
|
||||
# Set the Zsh functions to load (man zshcontrib).
|
||||
# zstyle ':omz:load' zfunction 'zargs' 'zmv'
|
||||
|
||||
# Set the Oh My Zsh modules to load (browse modules).
|
||||
zstyle ':omz:load' omodule 'environment' 'terminal' 'editor' 'completion' \
|
||||
'history' 'directory' 'spectrum' 'utility' 'prompt' 'history-substring-search'
|
||||
|
||||
# Set the prompt theme to load.
|
||||
# Setting it to 'random' loads a random theme.
|
||||
# Auto set to 'off' on dumb terminals.
|
||||
zstyle ':omz:module:prompt' theme "$ZSH_THEME"
|
||||
|
||||
# This will make you shout: OH MY ZSHELL!
|
||||
source "$OMZ/init.zsh"
|
||||
1
zsh/prezto
Submodule
1
zsh/prezto
Submodule
Submodule zsh/prezto added at cc7e43b242
4
zsh/prezto-themes/README.md
Normal file
4
zsh/prezto-themes/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
modules/prompt/functions contains custom prompts for Prezto
|
||||
These themes can be submitted to Prezto to be official. Until they are accepted, they can live here.
|
||||
|
||||
Learn more at: https://github.com/sorin-ionescu/prezto
|
||||
94
zsh/prezto-themes/modules/prompt/functions/prompt_skwp_setup
Normal file
94
zsh/prezto-themes/modules/prompt/functions/prompt_skwp_setup
Normal file
@@ -0,0 +1,94 @@
|
||||
#
|
||||
# A theme based on steeef theme
|
||||
# * RVM info shown on the right
|
||||
# * Git branch info on the left
|
||||
# * Single line prompt
|
||||
#
|
||||
# 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>
|
||||
|
||||
function rvm_info_for_prompt {
|
||||
if [[ -d ~/.rvm/ ]]; then
|
||||
ruby_version=$(~/.rvm/bin/rvm-prompt)
|
||||
if [ -n "$ruby_version" ]; then
|
||||
echo "[$ruby_version]"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_skwp_precmd {
|
||||
# Check for untracked files or updated submodules since vcs_info doesn't.
|
||||
if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
|
||||
fmt_branch="(${__PROMPT_SKWP_COLORS[1]}%b%f%u%c${__PROMPT_SKWP_COLORS[4]}●%f)"
|
||||
else
|
||||
fmt_branch="(${__PROMPT_SKWP_COLORS[1]}%b%f%u%c)"
|
||||
fi
|
||||
zstyle ':vcs_info:*:prompt:*' formats "${fmt_branch}"
|
||||
|
||||
vcs_info 'prompt'
|
||||
}
|
||||
|
||||
function prompt_skwp_setup {
|
||||
setopt LOCAL_OPTIONS
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
prompt_opts=(cr percent subst)
|
||||
|
||||
autoload -Uz add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
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
|
||||
|
||||
# Enable VCS systems you use.
|
||||
zstyle ':vcs_info:*' enable bzr git hg svn
|
||||
|
||||
# check-for-changes can be really slow.
|
||||
# You should disable it if you work with large repositories.
|
||||
zstyle ':vcs_info:*:prompt:*' check-for-changes true
|
||||
|
||||
# Formats:
|
||||
# %b - branchname
|
||||
# %u - unstagedstr (see below)
|
||||
# %c - stagedstr (see below)
|
||||
# %a - action (e.g. rebase-i)
|
||||
# %R - repository path
|
||||
# %S - path in the repository
|
||||
local fmt_branch="(${__PROMPT_SKWP_COLORS[1]}%b%f%u%c)"
|
||||
local fmt_action="(${__PROMPT_SKWP_COLORS[5]}%a%f)"
|
||||
local fmt_unstaged="${__PROMPT_SKWP_COLORS[2]}●%f"
|
||||
local fmt_staged="${__PROMPT_SKWP_COLORS[5]}●%f"
|
||||
|
||||
zstyle ':vcs_info:*:prompt:*' unstagedstr "${fmt_unstaged}"
|
||||
zstyle ':vcs_info:*:prompt:*' stagedstr "${fmt_staged}"
|
||||
zstyle ':vcs_info:*:prompt:*' actionformats "${fmt_branch}${fmt_action}"
|
||||
zstyle ':vcs_info:*:prompt:*' formats "${fmt_branch}"
|
||||
zstyle ':vcs_info:*:prompt:*' nvcsformats ""
|
||||
|
||||
PROMPT="${__PROMPT_SKWP_COLORS[3]}%n%f@${__PROMPT_SKWP_COLORS[2]}%m%f ${__PROMPT_SKWP_COLORS[5]}%~%f "'${vcs_info_msg_0_}'"$ "
|
||||
RPROMPT="%F{blue}"'$(rvm_info_for_prompt)'""
|
||||
}
|
||||
|
||||
prompt_skwp_setup "$@"
|
||||
1
zsh/theme.zsh
Normal file
1
zsh/theme.zsh
Normal file
@@ -0,0 +1 @@
|
||||
prompt skwp
|
||||
51
zsh/zshrc
51
zsh/zshrc
@@ -1,51 +0,0 @@
|
||||
# --------------------------------
|
||||
#
|
||||
# DO NOT EDIT THIS FILE.
|
||||
# If you want to make changes, do so in the custom/zsh directory.
|
||||
# Fork and send pull requests to add features and fix bugs. Thanks!
|
||||
#
|
||||
# ================================
|
||||
|
||||
# Don't change. The following determines where YADR is installed.
|
||||
yadr=$HOME/.yadr
|
||||
|
||||
# Source oh-my-zsh if it is installed.
|
||||
if [[ -d $HOME/.oh-my-zsh ]]; then
|
||||
# Path to your oh-my-zsh configuration.
|
||||
ZSH=$HOME/.oh-my-zsh
|
||||
|
||||
# Set name of the theme to load.
|
||||
ZSH_THEME="skwp"
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
plugins=(vi-mode rvm ruby bundler zsh-syntax-highlighting history-substring-search)
|
||||
|
||||
# source every zsh file in user's custom/zsh/before. This is useful for setting theme and plugins.
|
||||
if [[ -d $yadr/custom/zsh/before ]]; then
|
||||
for config_file ($yadr/custom/zsh/before/*) source $config_file
|
||||
fi
|
||||
|
||||
# Figure out if we have Robby's or Sorin's Oh-my-zsh
|
||||
if [[ -f $ZSH/oh-my-zsh.sh ]]; then
|
||||
source $ZSH/oh-my-zsh.sh # OMZ Robby Russell (https://github.com/robbyrussell/oh-my-zsh)
|
||||
else
|
||||
source $yadr/zsh/omz-sorin/omz-sorin.zsh # OMZ Sorin Ionescu (https://github.com/sorin-ionescu/oh-my-zsh)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Configuration
|
||||
for config_file ($yadr/zsh/*.zsh) source $config_file
|
||||
|
||||
# ------------------
|
||||
# zsh/after
|
||||
# ==================
|
||||
# source every zsh file in user's custom/zsh/after.
|
||||
if [[ -d $yadr/custom/zsh/after ]]; then
|
||||
for config_file ($yadr/custom/zsh/after/*) source $config_file
|
||||
fi
|
||||
|
||||
# Put secret configuration settings in ~/.secrets
|
||||
if [[ -a ~/.secrets ]] then
|
||||
source ~/.secrets
|
||||
fi
|
||||
4
zsh/zzzz_after.zsh
Normal file
4
zsh/zzzz_after.zsh
Normal file
@@ -0,0 +1,4 @@
|
||||
# Load any custom after code
|
||||
if [ -d $HOME/.zsh.after/ ]; then
|
||||
for config_file ($HOME/.zsh.after/*.zsh) source $config_file
|
||||
fi
|
||||
Reference in New Issue
Block a user