mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-03 06:27:21 +01:00
added my modified oh-my-zsh version to repository
This commit is contained in:
5
zsh/custom/example.zsh
Normal file
5
zsh/custom/example.zsh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Add yourself some shortcuts to projects you often work on
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# brainstormr=/Users/robbyrussell/Projects/development/planetargon/brainstormr
|
||||||
|
#
|
||||||
23
zsh/init.zsh
Normal file
23
zsh/init.zsh
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# Path to your oh-my-zsh configuration.
|
||||||
|
export ZSH=$HOME/.dotfiles/zsh
|
||||||
|
|
||||||
|
# Set to the name theme to load.
|
||||||
|
# Look in ~/.oh-my-zsh/themes/
|
||||||
|
export ZSH_THEME="afowler"
|
||||||
|
|
||||||
|
# Set to this to use case-sensitive completion
|
||||||
|
export CASE_SENSITIVE="true"
|
||||||
|
|
||||||
|
# Uncomment following line if you want to disable colors in ls
|
||||||
|
# export DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
|
# 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=(git)
|
||||||
|
|
||||||
|
source $ZSH/zsh.sh
|
||||||
|
|
||||||
|
# Customize to your needs...
|
||||||
|
|
||||||
23
zsh/lib/aliases.zsh
Normal file
23
zsh/lib/aliases.zsh
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Push and pop directories on directory stack
|
||||||
|
alias pu='pushd'
|
||||||
|
alias po='popd'
|
||||||
|
|
||||||
|
# Basic directory operations
|
||||||
|
alias ...='cd ../..'
|
||||||
|
alias -- -='cd -'
|
||||||
|
|
||||||
|
# Super user
|
||||||
|
alias _='sudo'
|
||||||
|
|
||||||
|
#alias g='grep -in'
|
||||||
|
|
||||||
|
# Show history
|
||||||
|
alias history='fc -l 1'
|
||||||
|
|
||||||
|
# List direcory contents
|
||||||
|
alias lsa='ls -lah'
|
||||||
|
alias l='ls -la'
|
||||||
|
alias ll='ls -l'
|
||||||
|
alias sl=ls # often screw this up
|
||||||
|
|
||||||
|
alias afind='ack-grep -il'
|
||||||
38
zsh/lib/appearance.zsh
Normal file
38
zsh/lib/appearance.zsh
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# ls colors
|
||||||
|
autoload colors; colors;
|
||||||
|
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||||
|
#export LS_COLORS
|
||||||
|
|
||||||
|
# Enable ls colors
|
||||||
|
if [ "$DISABLE_LS_COLORS" != "true" ]
|
||||||
|
then
|
||||||
|
# Find the option for using colors in ls, depending on the version: Linux or BSD
|
||||||
|
ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
|
||||||
|
fi
|
||||||
|
|
||||||
|
#setopt no_beep
|
||||||
|
setopt auto_cd
|
||||||
|
setopt multios
|
||||||
|
setopt cdablevarS
|
||||||
|
|
||||||
|
if [[ x$WINDOW != x ]]
|
||||||
|
then
|
||||||
|
SCREEN_NO="%B$WINDOW%b "
|
||||||
|
else
|
||||||
|
SCREEN_NO=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Apply theming defaults
|
||||||
|
PS1="%n@%m:%~%# "
|
||||||
|
|
||||||
|
# git theming default: Variables for theming the git info prompt
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean
|
||||||
|
|
||||||
|
# Setup the prompt with pretty colors
|
||||||
|
setopt prompt_subst
|
||||||
|
|
||||||
|
# Load the theme
|
||||||
|
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
||||||
42
zsh/lib/completion.zsh
Normal file
42
zsh/lib/completion.zsh
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# fixme - the load process here seems a bit bizarre
|
||||||
|
|
||||||
|
unsetopt menu_complete # do not autoselect the first completion entry
|
||||||
|
unsetopt flowcontrol
|
||||||
|
setopt auto_menu # show completion menu on succesive tab press
|
||||||
|
setopt complete_in_word
|
||||||
|
setopt always_to_end
|
||||||
|
|
||||||
|
WORDCHARS=''
|
||||||
|
|
||||||
|
autoload -U compinit
|
||||||
|
compinit -i
|
||||||
|
|
||||||
|
zmodload -i zsh/complist
|
||||||
|
|
||||||
|
## case-insensitive (all),partial-word and then substring completion
|
||||||
|
if [ "x$CASE_SENSITIVE" = "xtrue" ]; then
|
||||||
|
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
|
unset CASE_SENSITIVE
|
||||||
|
else
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
|
fi
|
||||||
|
|
||||||
|
zstyle ':completion:*' list-colors ''
|
||||||
|
|
||||||
|
# should this be in keybindings?
|
||||||
|
bindkey -M menuselect '^o' accept-and-infer-next-history
|
||||||
|
|
||||||
|
zstyle ':completion:*:*:*:*:*' menu select
|
||||||
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||||
|
zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w"
|
||||||
|
|
||||||
|
# disable named-directories autocompletion
|
||||||
|
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||||
|
cdpath=(.)
|
||||||
|
|
||||||
|
|
||||||
|
# Load known hosts file for auto-completion with ssh and scp commands
|
||||||
|
if [ -f ~/.ssh/known_hosts ]; then
|
||||||
|
zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts )
|
||||||
|
zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts`
|
||||||
|
fi
|
||||||
10
zsh/lib/correction.zsh
Normal file
10
zsh/lib/correction.zsh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
setopt correct_all
|
||||||
|
|
||||||
|
alias man='nocorrect man'
|
||||||
|
alias mv='nocorrect mv'
|
||||||
|
alias mysql='nocorrect mysql'
|
||||||
|
alias mkdir='nocorrect mkdir'
|
||||||
|
alias gist='nocorrect gist'
|
||||||
|
alias heroku='nocorrect heroku'
|
||||||
|
alias ebuild='nocorrect ebuild'
|
||||||
|
alias hpodder='nocorrect hpodder'
|
||||||
40
zsh/lib/directories.zsh
Normal file
40
zsh/lib/directories.zsh
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Changing/making/removing directory
|
||||||
|
setopt auto_name_dirs
|
||||||
|
setopt auto_pushd
|
||||||
|
setopt pushd_ignore_dups
|
||||||
|
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias cd..='cd ..'
|
||||||
|
alias cd...='cd ../..'
|
||||||
|
alias cd....='cd ../../..'
|
||||||
|
alias cd.....='cd ../../../..'
|
||||||
|
alias cd/='cd /'
|
||||||
|
|
||||||
|
alias 1='cd -'
|
||||||
|
alias 2='cd +2'
|
||||||
|
alias 3='cd +3'
|
||||||
|
alias 4='cd +4'
|
||||||
|
alias 5='cd +5'
|
||||||
|
alias 6='cd +6'
|
||||||
|
alias 7='cd +7'
|
||||||
|
alias 8='cd +8'
|
||||||
|
alias 9='cd +9'
|
||||||
|
|
||||||
|
cd () {
|
||||||
|
if [[ "x$*" == "x..." ]]; then
|
||||||
|
cd ../..
|
||||||
|
elif [[ "x$*" == "x...." ]]; then
|
||||||
|
cd ../../..
|
||||||
|
elif [[ "x$*" == "x....." ]]; then
|
||||||
|
cd ../../..
|
||||||
|
elif [[ "x$*" == "x......" ]]; then
|
||||||
|
cd ../../../..
|
||||||
|
else
|
||||||
|
builtin cd "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
alias md='mkdir -p'
|
||||||
|
alias rd=rmdir
|
||||||
|
|
||||||
|
alias d='dirs -v'
|
||||||
2
zsh/lib/editor.zsh
Normal file
2
zsh/lib/editor.zsh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export EDITOR=vim
|
||||||
|
alias e=$EDITOR
|
||||||
39
zsh/lib/functions.zsh
Normal file
39
zsh/lib/functions.zsh
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
## fixme, i duplicated this in xterms - oops
|
||||||
|
function title {
|
||||||
|
if [[ $TERM == "screen" ]]; then
|
||||||
|
# Use these two for GNU Screen:
|
||||||
|
print -nR $'\033k'$1$'\033'\\\
|
||||||
|
|
||||||
|
print -nR $'\033]0;'$2$'\a'
|
||||||
|
elif [[ ($TERM =~ "^xterm") ]] || [[ ($TERM == "rxvt") ]]; then
|
||||||
|
# Use this one instead for XTerms:
|
||||||
|
print -nR $'\033]0;'$*$'\a'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function precmd {
|
||||||
|
title zsh "$PWD"
|
||||||
|
}
|
||||||
|
|
||||||
|
function preexec {
|
||||||
|
emulate -L zsh
|
||||||
|
local -a cmd; cmd=(${(z)1})
|
||||||
|
title $cmd[1]:t "$cmd[2,-1]"
|
||||||
|
}
|
||||||
|
|
||||||
|
function zsh_stats() {
|
||||||
|
history | awk '{print $2}' | sort | uniq -c | sort -rn | head
|
||||||
|
}
|
||||||
|
|
||||||
|
function uninstall_oh_my_zsh() {
|
||||||
|
/bin/sh $ZSH/tools/uninstall.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
function upgrade_oh_my_zsh() {
|
||||||
|
/bin/sh $ZSH/tools/upgrade.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
function take() {
|
||||||
|
mkdir -p $1
|
||||||
|
cd $1
|
||||||
|
}
|
||||||
40
zsh/lib/git.zsh
Normal file
40
zsh/lib/git.zsh
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# get the name of the branch we are on
|
||||||
|
function git_prompt_info() {
|
||||||
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||||
|
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_git_dirty () {
|
||||||
|
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||||
|
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||||
|
else
|
||||||
|
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# get the status of the working tree
|
||||||
|
git_prompt_status() {
|
||||||
|
INDEX=$(git status --porcelain 2> /dev/null)
|
||||||
|
STATUS=""
|
||||||
|
if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^A ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
|
||||||
|
elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
|
||||||
|
fi
|
||||||
|
echo $STATUS
|
||||||
|
}
|
||||||
6
zsh/lib/grep.zsh
Normal file
6
zsh/lib/grep.zsh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#
|
||||||
|
# Color grep results
|
||||||
|
# Examples: http://rubyurl.com/ZXv
|
||||||
|
#
|
||||||
|
export GREP_OPTIONS='--color=auto'
|
||||||
|
export GREP_COLOR='1;32'
|
||||||
16
zsh/lib/history.zsh
Normal file
16
zsh/lib/history.zsh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
## Command history configuration
|
||||||
|
HISTFILE=$HOME/.zsh_history
|
||||||
|
HISTSIZE=10000
|
||||||
|
SAVEHIST=10000
|
||||||
|
|
||||||
|
setopt hist_ignore_dups # ignore duplication command history list
|
||||||
|
setopt share_history # share command history data
|
||||||
|
|
||||||
|
setopt hist_verify
|
||||||
|
setopt inc_append_history
|
||||||
|
setopt extended_history
|
||||||
|
setopt hist_expire_dups_first
|
||||||
|
setopt hist_ignore_space
|
||||||
|
|
||||||
|
setopt SHARE_HISTORY
|
||||||
|
setopt APPEND_HISTORY
|
||||||
42
zsh/lib/key-bindings.zsh
Normal file
42
zsh/lib/key-bindings.zsh
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# TODO: Explain what some of this does..
|
||||||
|
autoload -U compinit
|
||||||
|
compinit -i
|
||||||
|
|
||||||
|
bindkey -e
|
||||||
|
bindkey '\ew' kill-region
|
||||||
|
bindkey -s '\el' "ls\n"
|
||||||
|
bindkey -s '\e.' "..\n"
|
||||||
|
bindkey '^r' history-incremental-search-backward
|
||||||
|
bindkey "^[[5~" up-line-or-history
|
||||||
|
bindkey "^[[6~" down-line-or-history
|
||||||
|
|
||||||
|
# make search up and down work, so partially type and hit up/down to find relevant stuff
|
||||||
|
bindkey '^[[A' up-line-or-search
|
||||||
|
bindkey '^[[B' down-line-or-search
|
||||||
|
|
||||||
|
bindkey "^[[H" beginning-of-line
|
||||||
|
bindkey "^[[1~" beginning-of-line
|
||||||
|
bindkey "^[[F" end-of-line
|
||||||
|
bindkey "^[[4~" end-of-line
|
||||||
|
bindkey ' ' magic-space # also do history expansion on space
|
||||||
|
|
||||||
|
bindkey '^[[Z' reverse-menu-complete
|
||||||
|
|
||||||
|
# consider emacs keybindings:
|
||||||
|
|
||||||
|
#bindkey -e ## emacs key bindings
|
||||||
|
#
|
||||||
|
#bindkey '^[[A' up-line-or-search
|
||||||
|
#bindkey '^[[B' down-line-or-search
|
||||||
|
#bindkey '^[^[[C' emacs-forward-word
|
||||||
|
#bindkey '^[^[[D' emacs-backward-word
|
||||||
|
#
|
||||||
|
#bindkey -s '^X^Z' '%-^M'
|
||||||
|
#bindkey '^[e' expand-cmd-path
|
||||||
|
#bindkey '^[^I' reverse-menu-complete
|
||||||
|
#bindkey '^X^N' accept-and-infer-next-history
|
||||||
|
#bindkey '^W' kill-region
|
||||||
|
#bindkey '^I' complete-word
|
||||||
|
## Fix weird sequence that rxvt produces
|
||||||
|
#bindkey -s '^[[Z' '\t'
|
||||||
|
#
|
||||||
13
zsh/lib/misc.zsh
Normal file
13
zsh/lib/misc.zsh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## smart urls
|
||||||
|
autoload -U url-quote-magic
|
||||||
|
zle -N self-insert url-quote-magic
|
||||||
|
|
||||||
|
## file rename magick
|
||||||
|
bindkey "^[m" copy-prev-shell-word
|
||||||
|
|
||||||
|
## jobs
|
||||||
|
setopt long_list_jobs
|
||||||
|
|
||||||
|
## pager
|
||||||
|
export PAGER=less
|
||||||
|
export LC_CTYPE=en_US.UTF-8
|
||||||
2
zsh/lib/path.zsh
Normal file
2
zsh/lib/path.zsh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export PATH=$HOME/bin:/usr/local/bin:/Applications/Emacs.app/Contents/MacOS/bin:$PATH
|
||||||
|
|
||||||
1
zsh/lib/paths.zsh
Normal file
1
zsh/lib/paths.zsh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
inbox="$HOME/Desktop/Inbox"
|
||||||
20
zsh/lib/spectrum.zsh
Normal file
20
zsh/lib/spectrum.zsh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
# A script to make using 256 colors in zsh less painful.
|
||||||
|
# P.C. Shyamshankar <sykora@lucentbeing.com>
|
||||||
|
# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
|
||||||
|
|
||||||
|
typeset -Ag FX FG BG
|
||||||
|
|
||||||
|
FX=(
|
||||||
|
reset "%{[00m%}"
|
||||||
|
bold "%{[01m%}" no-bold "%{[22m%}"
|
||||||
|
italic "%{[03m%}" no-italic "%{[23m%}"
|
||||||
|
underline "%{[04m%}" no-underline "%{[24m%}"
|
||||||
|
blink "%{[05m%}" no-blink "%{[25m%}"
|
||||||
|
reverse "%{[07m%}" no-reverse "%{[27m%}"
|
||||||
|
)
|
||||||
|
|
||||||
|
for color in {000..255}; do
|
||||||
|
FG[$color]="%{[38;5;${color}m%}"
|
||||||
|
BG[$color]="%{[48;5;${color}m%}"
|
||||||
|
done
|
||||||
21
zsh/lib/termsupport.zsh
Normal file
21
zsh/lib/termsupport.zsh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
preexec () {
|
||||||
|
print -Pn "\e]0;%n@%m: $1\a" # xterm
|
||||||
|
}
|
||||||
|
precmd () {
|
||||||
|
print -Pn "\e]0;%n@%m: %~\a" # xterm
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
screen*)
|
||||||
|
preexec () {
|
||||||
|
local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
|
||||||
|
echo -ne "\ek$CMD\e\\"
|
||||||
|
print -Pn "\e]0;%n@%m: $1\a" # xterm
|
||||||
|
}
|
||||||
|
precmd () {
|
||||||
|
echo -ne "\ekzsh\e\\"
|
||||||
|
print -Pn "\e]0;%n@%m: %~\a" # xterm
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
4
zsh/log/.easter-egg
Normal file
4
zsh/log/.easter-egg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
This file is only here so that Git will keep a log directory as .gitignore is ignoring all the log files within it.
|
||||||
|
|
||||||
|
feel free to add love notes for people here.
|
||||||
|
|
||||||
21
zsh/plugins/cap/cap.plugin.zsh
Normal file
21
zsh/plugins/cap/cap.plugin.zsh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
function _cap_does_task_list_need_generating () {
|
||||||
|
if [ ! -f .cap_tasks~ ]; then return 0;
|
||||||
|
else
|
||||||
|
accurate=$(stat -f%m .cap_tasks~)
|
||||||
|
changed=$(stat -f%m config/deploy.rb)
|
||||||
|
return $(expr $accurate '>=' $changed)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function _cap () {
|
||||||
|
if [ -f config/deploy.rb ]; then
|
||||||
|
if _cap_does_task_list_need_generating; then
|
||||||
|
echo "\nGenerating .cap_tasks~..." > /dev/stderr
|
||||||
|
cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D'
|
||||||
|
> .cap_tasks~
|
||||||
|
fi
|
||||||
|
compadd `cat .cap_tasks~`
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
compctl -K _cap cap
|
||||||
39
zsh/plugins/dirpersist/dirpersist.plugin.zsh
Normal file
39
zsh/plugins/dirpersist/dirpersist.plugin.zsh
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
#
|
||||||
|
# Make the dirstack more persistant
|
||||||
|
#
|
||||||
|
# Add dirpersist to $plugins in ~/.zshrc to load
|
||||||
|
#
|
||||||
|
|
||||||
|
# $zdirstore is the file used to persist the stack
|
||||||
|
zdirstore=~/.zdirstore
|
||||||
|
|
||||||
|
dirpersistinstall () {
|
||||||
|
if grep 'dirpersiststore' ~/.zlogout > /dev/null; then
|
||||||
|
else
|
||||||
|
if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then
|
||||||
|
echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout
|
||||||
|
else
|
||||||
|
echo "If you don't want this message to appear, remove dirspersist from \$plugins"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
dirpersiststore () {
|
||||||
|
dirs -p | perl -e 'foreach (reverse <STDIN>) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}' > $zdirstore
|
||||||
|
}
|
||||||
|
|
||||||
|
dirpersistrestore () {
|
||||||
|
if [ -f $zdirstore ]; then
|
||||||
|
source $zdirstore
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
DIRSTACKSIZE=10
|
||||||
|
setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups
|
||||||
|
|
||||||
|
dirpersistinstall
|
||||||
|
dirpersistrestore
|
||||||
|
|
||||||
|
# Make popd changes permanent without having to wait for logout
|
||||||
|
alias popd="popd;dirpersiststore"
|
||||||
64
zsh/plugins/gem/_gem
Normal file
64
zsh/plugins/gem/_gem
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#compdef gem
|
||||||
|
#autoload
|
||||||
|
|
||||||
|
# gem zsh completion, based on homebrew completion
|
||||||
|
|
||||||
|
_gem_installed() {
|
||||||
|
installed_gems=(`gem list --local --no-versions`)
|
||||||
|
}
|
||||||
|
|
||||||
|
local -a _1st_arguments
|
||||||
|
_1st_arguments=(
|
||||||
|
'cert:Manage RubyGems certificates and signing settings'
|
||||||
|
'check:Check installed gems'
|
||||||
|
'cleanup:Clean up old versions of installed gems in the local repository'
|
||||||
|
'contents:Display the contents of the installed gems'
|
||||||
|
'dependency:Show the dependencies of an installed gem'
|
||||||
|
'environment:Display information about the RubyGems environment'
|
||||||
|
'fetch:Download a gem and place it in the current directory'
|
||||||
|
'generate_index:Generates the index files for a gem server directory'
|
||||||
|
'help:Provide help on the `gem` command'
|
||||||
|
'install:Install a gem into the local repository'
|
||||||
|
'list:Display gems whose name starts with STRING'
|
||||||
|
'lock:Generate a lockdown list of gems'
|
||||||
|
'mirror:Mirror a gem repository'
|
||||||
|
'outdated:Display all gems that need updates'
|
||||||
|
'owner:Manage gem owners on RubyGems.org.'
|
||||||
|
'pristine:Restores installed gems to pristine condition from files located in the gem cache'
|
||||||
|
'push:Push a gem up to RubyGems.org'
|
||||||
|
'query:Query gem information in local or remote repositories'
|
||||||
|
'rdoc:Generates RDoc for pre-installed gems'
|
||||||
|
'search:Display all gems whose name contains STRING'
|
||||||
|
'server:Documentation and gem repository HTTP server'
|
||||||
|
'sources:Manage the sources and cache file RubyGems uses to search for gems'
|
||||||
|
'specification:Display gem specification (in yaml)'
|
||||||
|
'stale:List gems along with access times'
|
||||||
|
'uninstall:Uninstall gems from the local repository'
|
||||||
|
'unpack:Unpack an installed gem to the current directory'
|
||||||
|
'update:Update the named gems (or all installed gems) in the local repository'
|
||||||
|
'which:Find the location of a library file you can require'
|
||||||
|
)
|
||||||
|
|
||||||
|
local expl
|
||||||
|
local -a gems installed_gems
|
||||||
|
|
||||||
|
_arguments \
|
||||||
|
'(-v --version)'{-v,--version}'[show version]' \
|
||||||
|
'(-h --help)'{-h,--help}'[show help]' \
|
||||||
|
'*:: :->subcmds' && return 0
|
||||||
|
|
||||||
|
if (( CURRENT == 1 )); then
|
||||||
|
_describe -t commands "gem subcommand" _1st_arguments
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$words[1]" in
|
||||||
|
list)
|
||||||
|
if [[ "$state" == forms ]]; then
|
||||||
|
_gem_installed
|
||||||
|
_requested installed_gems expl 'installed gems' compadd -a installed_gems
|
||||||
|
fi ;;
|
||||||
|
uninstall|update)
|
||||||
|
_gem_installed
|
||||||
|
_wanted installed_gems expl 'installed gems' compadd -a installed_gems ;;
|
||||||
|
esac
|
||||||
4
zsh/plugins/gem/gem.plugin.zsh
Normal file
4
zsh/plugins/gem/gem.plugin.zsh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# add brew completion function to path
|
||||||
|
fpath=($ZSH/plugins/gem $fpath)
|
||||||
|
autoload -U compinit
|
||||||
|
compinit -i
|
||||||
32
zsh/plugins/git/git.plugin.zsh
Normal file
32
zsh/plugins/git/git.plugin.zsh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Aliases
|
||||||
|
alias g='git'
|
||||||
|
alias gst='git status'
|
||||||
|
alias gl='git pull'
|
||||||
|
alias gup='git fetch && git rebase'
|
||||||
|
alias gp='git push'
|
||||||
|
alias gd='git diff | mate'
|
||||||
|
alias gdv='git diff -w "$@" | vim -R -'
|
||||||
|
alias gc='git commit -v'
|
||||||
|
alias gca='git commit -v -a'
|
||||||
|
alias gb='git branch'
|
||||||
|
alias gba='git branch -a'
|
||||||
|
alias gcount='git shortlog -sn'
|
||||||
|
alias gcp='git cherry-pick'
|
||||||
|
alias glg='git log --stat --max-count=5'
|
||||||
|
|
||||||
|
# Git and svn mix
|
||||||
|
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Will return the current branch name
|
||||||
|
# Usage example: git pull origin $(current_branch)
|
||||||
|
#
|
||||||
|
function current_branch() {
|
||||||
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||||
|
echo ${ref#refs/heads/}
|
||||||
|
}
|
||||||
|
|
||||||
|
# these aliases take advangate of the previous function
|
||||||
|
alias ggpull='git pull origin $(current_branch)'
|
||||||
|
alias ggpush='git push origin $(current_branch)'
|
||||||
|
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
|
||||||
40
zsh/plugins/github/_github
Normal file
40
zsh/plugins/github/_github
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#compdef github
|
||||||
|
#autoload
|
||||||
|
|
||||||
|
# in order to make this work, you will need to have the github gem installed
|
||||||
|
# http://github.com/defunkt/github-gem
|
||||||
|
|
||||||
|
# github zsh completion, based on homebrew completion
|
||||||
|
|
||||||
|
local -a _1st_arguments
|
||||||
|
_1st_arguments=(
|
||||||
|
'browse:Open this repo in a web browser'
|
||||||
|
'clone:Clone a repo'
|
||||||
|
'config:Automatically set configuration info, or pass args to specify'
|
||||||
|
'create-from-local:Create a new GitHub repository from the current local repository'
|
||||||
|
'create:Create a new empty GitHub repository'
|
||||||
|
'fetch:Fetch from a remote to a local branch'
|
||||||
|
'fetch_all:Fetch all refs from a user'
|
||||||
|
'fork:Forks a GitHub repository'
|
||||||
|
'home:Open this repos master branch in a web browser'
|
||||||
|
'ignore:Ignore a SHA from github network commits'
|
||||||
|
'info:Info about this project'
|
||||||
|
'issues:Project issues tools'
|
||||||
|
'network:Project network tools - sub-commands : web [user], list, fetch, commits'
|
||||||
|
'open:Open the given user/project in a web browser'
|
||||||
|
'pull-request:Generate the text for a pull request'
|
||||||
|
'pull:Pull from a remote'
|
||||||
|
'search:Search GitHub for the given repository name'
|
||||||
|
'track:Track another users repository'
|
||||||
|
)
|
||||||
|
|
||||||
|
local expl
|
||||||
|
local -a pkgs installed_pkgs
|
||||||
|
|
||||||
|
_arguments \
|
||||||
|
'*:: :->subcmds' && return 0
|
||||||
|
|
||||||
|
if (( CURRENT == 1 )); then
|
||||||
|
_describe -t commands "github subcommand" _1st_arguments
|
||||||
|
return
|
||||||
|
fi
|
||||||
4
zsh/plugins/github/github.plugin.zsh
Normal file
4
zsh/plugins/github/github.plugin.zsh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# add github completion function to path
|
||||||
|
fpath=($ZSH/plugins/github $fpath)
|
||||||
|
autoload -U compinit
|
||||||
|
compinit -i
|
||||||
16
zsh/plugins/lighthouse/lighthouse.plugin.zsh
Normal file
16
zsh/plugins/lighthouse/lighthouse.plugin.zsh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# To use: add a .lighthouse file into your directory with the URL to the
|
||||||
|
# individual project. For example:
|
||||||
|
# https://rails.lighthouseapp.com/projects/8994
|
||||||
|
# Example usage: http://screencast.com/t/ZDgwNDUwNT
|
||||||
|
open_lighthouse_ticket () {
|
||||||
|
if [ ! -f .lighthouse-url ]; then
|
||||||
|
echo "There is no .lighthouse file in the current directory..."
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
lighthouse_url=$(cat .lighthouse-url);
|
||||||
|
echo "Opening ticket #$1";
|
||||||
|
`open $lighthouse_url/tickets/$1`;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
alias lho='open_lighthouse_ticket'
|
||||||
6
zsh/plugins/mysql/mysql-macports.plugin.zsh
Normal file
6
zsh/plugins/mysql/mysql-macports.plugin.zsh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# commands to control local mysql-server installation
|
||||||
|
# paths are for osx installtion via macports
|
||||||
|
|
||||||
|
alias mysqlstart='sudo /opt/local/bin/mysqld_safe5'
|
||||||
|
alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown'
|
||||||
|
alias mysqlstatus='mysqladmin5 -u root -p ping'
|
||||||
46
zsh/plugins/pip/_pip
Normal file
46
zsh/plugins/pip/_pip
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
#compdef pip
|
||||||
|
#autoload
|
||||||
|
|
||||||
|
# pip zsh completion, based on homebrew completion
|
||||||
|
|
||||||
|
_pip_installed() {
|
||||||
|
installed_pkgs=(`pip freeze`)
|
||||||
|
}
|
||||||
|
|
||||||
|
local -a _1st_arguments
|
||||||
|
_1st_arguments=(
|
||||||
|
'bundle:Create pybundles (archives containing multiple packages)'
|
||||||
|
'freeze:Output all currently installed packages (exact versions) to stdout'
|
||||||
|
'help:Show available commands'
|
||||||
|
'install:Install packages'
|
||||||
|
'search:Search PyPI'
|
||||||
|
'uninstall:Uninstall packages'
|
||||||
|
'unzip:Unzip individual packages'
|
||||||
|
'zip:Zip individual packages'
|
||||||
|
)
|
||||||
|
|
||||||
|
local expl
|
||||||
|
local -a pkgs installed_pkgs
|
||||||
|
|
||||||
|
_arguments \
|
||||||
|
'(--version)--version[Show version number of program and exit]' \
|
||||||
|
'(-v --verbose)'{-v,--verbose}'[Give more output]' \
|
||||||
|
'(-q --quiet)'{-q,--quiet}'[Give less output]' \
|
||||||
|
'(-h --help)'{-h,--help}'[Show help]' \
|
||||||
|
'*:: :->subcmds' && return 0
|
||||||
|
|
||||||
|
if (( CURRENT == 1 )); then
|
||||||
|
_describe -t commands "pip subcommand" _1st_arguments
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$words[1]" in
|
||||||
|
list)
|
||||||
|
if [[ "$state" == forms ]]; then
|
||||||
|
_pip_installed
|
||||||
|
_requested installed_pkgs expl 'installed packages' compadd -a installed_pkgs
|
||||||
|
fi ;;
|
||||||
|
uninstall)
|
||||||
|
_pip_installed
|
||||||
|
_wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;;
|
||||||
|
esac
|
||||||
4
zsh/plugins/pip/pip.plugin.zsh
Normal file
4
zsh/plugins/pip/pip.plugin.zsh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# add brew completion function to path
|
||||||
|
fpath=($ZSH/plugins/pip $fpath)
|
||||||
|
autoload -U compinit
|
||||||
|
compinit -i
|
||||||
13
zsh/plugins/rails/rails.plugin.zsh
Normal file
13
zsh/plugins/rails/rails.plugin.zsh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
alias ss='thin --stats "/thin/stats" start'
|
||||||
|
alias sg='ruby script/generate'
|
||||||
|
alias sd='ruby script/destroy'
|
||||||
|
alias sp='ruby script/plugin'
|
||||||
|
alias ssp='ruby script/spec'
|
||||||
|
alias rdbm='rake db:migrate'
|
||||||
|
alias sc='ruby script/console'
|
||||||
|
alias sd='ruby script/server --debugger'
|
||||||
|
alias devlog='tail -f log/development.log'
|
||||||
|
|
||||||
|
function remote_console() {
|
||||||
|
/usr/bin/env ssh $1 "( cd $2 && ruby script/console production )"
|
||||||
|
}
|
||||||
4
zsh/plugins/ruby/ruby.plugin.zsh
Normal file
4
zsh/plugins/ruby/ruby.plugin.zsh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
alias sgem='sudo gem'
|
||||||
|
|
||||||
|
# Find ruby file
|
||||||
|
alias rfind='find . -name *.rb | xargs grep -n'
|
||||||
23
zsh/plugins/ssh-agent/ssh-agent.plugin.zsh
Normal file
23
zsh/plugins/ssh-agent/ssh-agent.plugin.zsh
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Based on code from Joseph M. Reagle
|
||||||
|
# http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html
|
||||||
|
|
||||||
|
local SSH_ENV=$HOME/.ssh/environment
|
||||||
|
|
||||||
|
function start_agent {
|
||||||
|
/usr/bin/env ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV}
|
||||||
|
chmod 600 ${SSH_ENV}
|
||||||
|
. ${SSH_ENV} > /dev/null
|
||||||
|
/usr/bin/ssh-add;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Source SSH settings, if applicable
|
||||||
|
|
||||||
|
if [ -f "${SSH_ENV}" ]; then
|
||||||
|
. ${SSH_ENV} > /dev/null
|
||||||
|
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
|
||||||
|
start_agent;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
start_agent;
|
||||||
|
fi
|
||||||
|
|
||||||
14
zsh/plugins/textmate/textmate.plugin.zsh
Normal file
14
zsh/plugins/textmate/textmate.plugin.zsh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
# TextMate
|
||||||
|
alias et='mate . &'
|
||||||
|
alias ett='mate app config lib db public spec test Rakefile Capfile Todo &'
|
||||||
|
alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &'
|
||||||
|
alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &'
|
||||||
|
|
||||||
|
# Editor Ruby file in TextMate
|
||||||
|
alias mr='mate CHANGELOG app config db lib public script spec test'
|
||||||
|
|
||||||
|
function tm() {
|
||||||
|
cd $1
|
||||||
|
mate $1
|
||||||
|
}
|
||||||
22
zsh/plugins/vi-mode/vi-mode.plugin.zsh
Normal file
22
zsh/plugins/vi-mode/vi-mode.plugin.zsh
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
function zle-line-init zle-keymap-select {
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N zle-line-init
|
||||||
|
zle -N zle-keymap-select
|
||||||
|
|
||||||
|
bindkey -v
|
||||||
|
|
||||||
|
# if mode indicator wasn't setup by theme, define default
|
||||||
|
if [[ "$MODE_INDICATOR" == "" ]]; then
|
||||||
|
MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
function vi_mode_prompt_info() {
|
||||||
|
echo "${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# define right prompt, if it wasn't defined by a theme
|
||||||
|
if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then
|
||||||
|
RPS1='$(vi_mode_prompt_info)'
|
||||||
|
fi
|
||||||
143
zsh/prompt
143
zsh/prompt
@@ -1,143 +0,0 @@
|
|||||||
function precmd {
|
|
||||||
|
|
||||||
local TERMWIDTH
|
|
||||||
(( TERMWIDTH = ${COLUMNS} - 1 ))
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
# Truncate the path if it's too long.
|
|
||||||
|
|
||||||
PR_FILLBAR=""
|
|
||||||
PR_PWDLEN=""
|
|
||||||
|
|
||||||
local promptsize=${#${(%):---(%n@%m:%l)---()--}}
|
|
||||||
local pwdsize=${#${(%):-%~}}
|
|
||||||
|
|
||||||
if [[ "$promptsize + $pwdsize" -gt $TERMWIDTH ]]; then
|
|
||||||
((PR_PWDLEN=$TERMWIDTH - $promptsize))
|
|
||||||
else
|
|
||||||
PR_FILLBAR="\${(l.(($TERMWIDTH - ($promptsize + $pwdsize)))..${PR_HBAR}.)}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
# Get APM info.
|
|
||||||
|
|
||||||
if which ibam > /dev/null; then
|
|
||||||
PR_APM_RESULT=`ibam --percentbattery`
|
|
||||||
elif which apm > /dev/null; then
|
|
||||||
PR_APM_RESULT=`apm`
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
setopt extended_glob
|
|
||||||
preexec () {
|
|
||||||
if [[ "$TERM" == "screen" ]]; then
|
|
||||||
local CMD=${1[(wr)^(*=*|sudo|-*)]}
|
|
||||||
echo -n "\ek$CMD\e\\"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
setprompt () {
|
|
||||||
###
|
|
||||||
# Need this so the prompt will work.
|
|
||||||
|
|
||||||
setopt prompt_subst
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
# See if we can use colors.
|
|
||||||
|
|
||||||
autoload colors zsh/terminfo
|
|
||||||
if [[ "$terminfo[colors]" -ge 8 ]]; then
|
|
||||||
colors
|
|
||||||
fi
|
|
||||||
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
|
|
||||||
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
|
||||||
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
|
|
||||||
(( count = $count + 1 ))
|
|
||||||
done
|
|
||||||
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
# See if we can use extended characters to look nicer.
|
|
||||||
|
|
||||||
typeset -A altchar
|
|
||||||
set -A altchar ${(s..)terminfo[acsc]}
|
|
||||||
PR_SET_CHARSET="%{$terminfo[enacs]%}"
|
|
||||||
PR_SHIFT_IN="%{$terminfo[smacs]%}"
|
|
||||||
PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
|
|
||||||
PR_HBAR=${altchar[q]:--}
|
|
||||||
PR_ULCORNER=${altchar[l]:--}
|
|
||||||
PR_LLCORNER=${altchar[m]:--}
|
|
||||||
PR_LRCORNER=${altchar[j]:--}
|
|
||||||
PR_URCORNER=${altchar[k]:--}
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
# Decide if we need to set titlebar text.
|
|
||||||
|
|
||||||
case $TERM in
|
|
||||||
xterm*)
|
|
||||||
PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
|
|
||||||
;;
|
|
||||||
screen)
|
|
||||||
PR_TITLEBAR=$'%{\e_screen \005 (\005t) | %(!.-=[ROOT]=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\e\\%}'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
PR_TITLEBAR=''
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
# Decide whether to set a screen title
|
|
||||||
if [[ "$TERM" == "screen" ]]; then
|
|
||||||
PR_STITLE=$'%{\ekzsh\e\\%}'
|
|
||||||
else
|
|
||||||
PR_STITLE=''
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
# APM detection
|
|
||||||
|
|
||||||
if which ibam > /dev/null; then
|
|
||||||
PR_APM='$PR_RED${${PR_APM_RESULT[(f)1]}[(w)-2]}%%(${${PR_APM_RESULT[(f)3]}[(w)-1]})$PR_LIGHT_BLUE:'
|
|
||||||
elif which apm > /dev/null; then
|
|
||||||
PR_APM='$PR_RED${PR_APM_RESULT[(w)5,(w)6]/\% /%%}$PR_LIGHT_BLUE:'
|
|
||||||
else
|
|
||||||
PR_APM=''
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
# Finally, the prompt.
|
|
||||||
|
|
||||||
PROMPT='$PR_SET_CHARSET$PR_STITLE${(e)PR_TITLEBAR}\
|
|
||||||
$PR_CYAN$PR_SHIFT_IN$PR_ULCORNER$PR_BLUE$PR_HBAR$PR_SHIFT_OUT(\
|
|
||||||
$PR_GREEN%(!.%SROOT%s.%n)$PR_GREEN@%m:%l\
|
|
||||||
$PR_BLUE)$PR_SHIFT_IN$PR_HBAR$PR_CYAN$PR_HBAR${(e)PR_FILLBAR}$PR_BLUE$PR_HBAR$PR_SHIFT_OUT(\
|
|
||||||
$PR_MAGENTA%$PR_PWDLEN<...<%~%<<\
|
|
||||||
$PR_BLUE)$PR_SHIFT_IN$PR_HBAR$PR_CYAN$PR_URCORNER$PR_SHIFT_OUT\
|
|
||||||
|
|
||||||
$PR_CYAN$PR_SHIFT_IN$PR_LLCORNER$PR_BLUE$PR_HBAR$PR_SHIFT_OUT(\
|
|
||||||
%(?..$PR_LIGHT_RED%?$PR_BLUE:)\
|
|
||||||
${(e)PR_APM}$PR_YELLOW%D{%H:%M}\
|
|
||||||
$PR_LIGHT_BLUE:%(!.$PR_RED.$PR_WHITE)%#$PR_BLUE)$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
|
|
||||||
$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
|
|
||||||
$PR_NO_COLOUR '
|
|
||||||
|
|
||||||
RPROMPT=' $PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_BLUE$PR_HBAR$PR_SHIFT_OUT\
|
|
||||||
($PR_YELLOW%D{%a,%b%d}$PR_BLUE)$PR_SHIFT_IN$PR_HBAR$PR_CYAN$PR_LRCORNER$PR_SHIFT_OUT$PR_NO_COLOUR'
|
|
||||||
|
|
||||||
PS2='$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
|
|
||||||
$PR_BLUE$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT(\
|
|
||||||
$PR_LIGHT_GREEN%_$PR_BLUE)$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
|
|
||||||
$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT$PR_NO_COLOUR '
|
|
||||||
}
|
|
||||||
|
|
||||||
setprompt
|
|
||||||
6
zsh/themes/Soliah.zsh-theme
Normal file
6
zsh/themes/Soliah.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
PROMPT='%{$fg[blue]%}%B%20~%b%{$reset_color%}%{$(git_prompt_info)%} $ '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[green]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="*%{$reset_color%}"
|
||||||
|
|
||||||
10
zsh/themes/afowler.zsh-theme
Normal file
10
zsh/themes/afowler.zsh-theme
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
|
||||||
|
|
||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
|
||||||
|
|
||||||
|
RPS1="${return_code}"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||||
14
zsh/themes/arrow.zsh-theme
Normal file
14
zsh/themes/arrow.zsh-theme
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="yellow"; fi
|
||||||
|
|
||||||
|
PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}'
|
||||||
|
RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="git:"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="*"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
# See http://geoff.greer.fm/lscolors/
|
||||||
|
export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx"
|
||||||
|
export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:"
|
||||||
|
|
||||||
8
zsh/themes/aussiegeek.zsh-theme
Normal file
8
zsh/themes/aussiegeek.zsh-theme
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$(git_prompt_info)$fg[yellow]$(rvm_prompt_info)$fg_bold[blue] ]$reset_color
|
||||||
|
$ '
|
||||||
|
# git theming
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="$fg_bold[green]("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="✔"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="✗"
|
||||||
7
zsh/themes/candy.zsh-theme
Normal file
7
zsh/themes/candy.zsh-theme
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
|
||||||
|
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
14
zsh/themes/clean.zsh-theme
Normal file
14
zsh/themes/clean.zsh-theme
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="white"; fi
|
||||||
|
|
||||||
|
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
|
||||||
|
RPROMPT='[%*]'
|
||||||
|
|
||||||
|
# git theming
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}%B"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗"
|
||||||
|
|
||||||
|
# LS colors, made with http://geoff.greer.fm/lscolors/
|
||||||
|
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||||
|
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
||||||
6
zsh/themes/cloud.zsh-theme
Normal file
6
zsh/themes/cloud.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]"
|
||||||
4
zsh/themes/cypher.zsh-theme
Normal file
4
zsh/themes/cypher.zsh-theme
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Based on evan's prompt
|
||||||
|
# Shows the exit status of the last command if non-zero
|
||||||
|
# Uses "#" instead of "»" when running with elevated privileges
|
||||||
|
PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . ${fg[red]}%? )%{${fg[blue]}%}»%{${reset_color}%} "
|
||||||
26
zsh/themes/dallas.zsh-theme
Normal file
26
zsh/themes/dallas.zsh-theme
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Personalized!
|
||||||
|
|
||||||
|
# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
|
||||||
|
DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}"
|
||||||
|
# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
|
||||||
|
DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
|
||||||
|
# Grab the current machine name: muscato
|
||||||
|
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
|
||||||
|
# Grab the current filepath, use shortcuts: ~/Desktop
|
||||||
|
# Append the current git branch, if in a git repository: ~aw@master
|
||||||
|
DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}"
|
||||||
|
# Grab the current username: dallas
|
||||||
|
DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}"
|
||||||
|
# Use a % for normal users and a # for privelaged (root) users.
|
||||||
|
DALLAS_PROMPT_CHAR_="%{$fg[white]%}%(!.#.%%)%{$reset_color%}"
|
||||||
|
# For the git prompt, use a white @ and blue text for the branch name
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg[blue]%}"
|
||||||
|
# Close it all off by resetting the color and styles.
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
# Do nothing if the branch is clean (no changes).
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
# Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch!
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗"
|
||||||
|
|
||||||
|
# Put it all together!
|
||||||
|
PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ "
|
||||||
9
zsh/themes/darkblood.zsh-theme
Normal file
9
zsh/themes/darkblood.zsh-theme
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# meh. Dark Blood Rewind, a new beginning.
|
||||||
|
|
||||||
|
PROMPT=$'%{$fg[red]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[red]%}@%{$fg_bold[white]%}%m%{$reset_color%}%{$fg[red]%}] [%{$fg_bold[white]%}/dev/%y%{$reset_color%}%{$fg[red]%}] %{$(git_prompt_info)%}%(?,,%{$fg[red]%}[%{$fg_bold[white]%}%?%{$reset_color%}%{$fg[red]%}])
|
||||||
|
%{$fg[red]%}└[%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[red]%}]>%{$reset_color%} '
|
||||||
|
PS2=$' %{$fg[red]%}|>%{$reset_color%} '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}[%{$fg_bold[white]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[red]%}] "
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡%{$reset_color%}"
|
||||||
7
zsh/themes/daveverwer.zsh-theme
Normal file
7
zsh/themes/daveverwer.zsh-theme
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Copied and modified from the oh-my-zsh theme from geoffgarside
|
||||||
|
# Red server name, green cwd, blue git status
|
||||||
|
|
||||||
|
PROMPT='%{$fg[red]%}%m%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
||||||
16
zsh/themes/dst.zsh-theme
Normal file
16
zsh/themes/dst.zsh-theme
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
function prompt_char {
|
||||||
|
if [ "$(whoami)" = "root" ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
|
||||||
|
)
|
||||||
|
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)
|
||||||
|
%_ $(prompt_char) '
|
||||||
|
|
||||||
|
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
|
||||||
19
zsh/themes/dstufft.zsh-theme
Normal file
19
zsh/themes/dstufft.zsh-theme
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
function prompt_char {
|
||||||
|
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||||
|
hg root >/dev/null 2>/dev/null && echo 'Hg' && return
|
||||||
|
echo '○'
|
||||||
|
}
|
||||||
|
|
||||||
|
function virtualenv_info {
|
||||||
|
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT='
|
||||||
|
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
|
||||||
|
$(virtualenv_info)$(prompt_char) '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
8
zsh/themes/duellj.zsh-theme
Normal file
8
zsh/themes/duellj.zsh-theme
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
# user, host, full path, and time/date
|
||||||
|
# on two lines for easier vgrepping
|
||||||
|
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
|
||||||
|
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;34m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}%!%{\e[0;34m%}%B]%b%{\e[0m%}
|
||||||
|
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]%{\e[0m%}%b '
|
||||||
|
RPROMPT='[%*]'
|
||||||
|
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
|
||||||
19
zsh/themes/eastwood.zsh-theme
Normal file
19
zsh/themes/eastwood.zsh-theme
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#RVM settings
|
||||||
|
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||||
|
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||||
|
git_custom_status() {
|
||||||
|
local cb=$(current_branch)
|
||||||
|
if [ -n "$cb" ]; then
|
||||||
|
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT='$(git_custom_status)%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b '
|
||||||
6
zsh/themes/edvardm.zsh-theme
Normal file
6
zsh/themes/edvardm.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||||
2
zsh/themes/evan.zsh-theme
Normal file
2
zsh/themes/evan.zsh-theme
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Evan describes this sexy prompt as: "a skinny, topless prompt"
|
||||||
|
PROMPT='%m :: %2~ %B»%b '
|
||||||
5
zsh/themes/example.zsh-theme
Normal file
5
zsh/themes/example.zsh-theme
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Found on the ZshWiki
|
||||||
|
# http://zshwiki.org/home/config/prompt
|
||||||
|
#
|
||||||
|
|
||||||
|
PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% "
|
||||||
12
zsh/themes/fletcherm.zsh-theme
Normal file
12
zsh/themes/fletcherm.zsh-theme
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Copied from old version of tonotdo's theme. LSCOLORS modified.
|
||||||
|
PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» '
|
||||||
|
RPROMPT='[%*]'
|
||||||
|
|
||||||
|
# git theming
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}⚡%{$fg_bold[blue]%})"
|
||||||
|
|
||||||
|
export LSCOLORS="exfxcxdxbxegedabagacad"
|
||||||
|
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
||||||
14
zsh/themes/funky.zsh-theme
Normal file
14
zsh/themes/funky.zsh-theme
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Taken from Tassilo's Blog
|
||||||
|
# http://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/
|
||||||
|
|
||||||
|
local blue_op="%{$fg[blue]%}[%{$reset_color%}"
|
||||||
|
local blue_cp="%{$fg[blue]%}]%{$reset_color%}"
|
||||||
|
local path_p="${blue_op}%~${blue_cp}"
|
||||||
|
local user_host="${blue_op}%n@%m${blue_cp}"
|
||||||
|
local ret_status="${blue_op}%?${blue_cp}"
|
||||||
|
local hist_no="${blue_op}%h${blue_cp}"
|
||||||
|
local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color%})"
|
||||||
|
PROMPT="╭─${path_p}─${user_host}─${ret_status}─${hist_no}
|
||||||
|
╰─${blue_op}${smiley}${blue_cp} %# "
|
||||||
|
local cur_cmd="${blue_op}%_${blue_cp}"
|
||||||
|
PROMPT2="${cur_cmd}> "
|
||||||
8
zsh/themes/gallifrey.zsh-theme
Normal file
8
zsh/themes/gallifrey.zsh-theme
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# ZSH Theme - Preview: http://img.skitch.com/20091113-qqtd3j8xinysujg5ugrsbr7x1y.jpg
|
||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
PROMPT='%{$fg[green]%}%m%{$reset_color%} %2~ $(git_prompt_info)%{$reset_color%}%B»%b '
|
||||||
|
RPS1="${return_code}"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||||
6
zsh/themes/garyblessington.zsh-theme
Normal file
6
zsh/themes/garyblessington.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
PROMPT='%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}: '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[blue]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||||
5
zsh/themes/geoffgarside.zsh-theme
Normal file
5
zsh/themes/geoffgarside.zsh-theme
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) "
|
||||||
|
PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
||||||
15
zsh/themes/gozilla.zsh-theme
Normal file
15
zsh/themes/gozilla.zsh-theme
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
RPROMPT='$(git_prompt_status)%{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈"
|
||||||
|
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗"
|
||||||
|
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱"
|
||||||
5
zsh/themes/imajes.zsh-theme
Normal file
5
zsh/themes/imajes.zsh-theme
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Found on the ZshWiki
|
||||||
|
# http://zshwiki.org/home/config/prompt
|
||||||
|
#
|
||||||
|
|
||||||
|
PROMPT="%{$fg[red]%}%%%{$reset_color%} "
|
||||||
6
zsh/themes/jbergantine.zsh-theme
Normal file
6
zsh/themes/jbergantine.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[white]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%})"
|
||||||
31
zsh/themes/jnrowe.zsh-theme
Normal file
31
zsh/themes/jnrowe.zsh-theme
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
autoload -U add-zsh-hook
|
||||||
|
autoload -Uz vcs_info
|
||||||
|
|
||||||
|
zstyle ':vcs_info:*' actionformats \
|
||||||
|
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
|
||||||
|
zstyle ':vcs_info:*' formats \
|
||||||
|
'%F{2}%s%F{7}:%F{2}(%F{1}%b%F{2})%f '
|
||||||
|
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
|
||||||
|
zstyle ':vcs_info:*' enable git
|
||||||
|
|
||||||
|
add-zsh-hook precmd prompt_jnrowe_precmd
|
||||||
|
|
||||||
|
prompt_jnrowe_precmd () {
|
||||||
|
vcs_info
|
||||||
|
|
||||||
|
if [ "${vcs_info_msg_0_}" = "" ]; then
|
||||||
|
dir_status="%F{2}→%f"
|
||||||
|
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
|
||||||
|
dir_status="%F{1}▶%f"
|
||||||
|
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
|
||||||
|
dir_status="%F{3}▶%f"
|
||||||
|
else
|
||||||
|
dir_status="%F{2}▶%f"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
local ret_status="%(?:%{$fg_bold[green]%}Ξ:%{$fg_bold[red]%}%S↑%s%?)"
|
||||||
|
|
||||||
|
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg_bold[yellow]%}%2~ ${vcs_info_msg_0_}${dir_status}%{$reset_color%} '
|
||||||
|
|
||||||
|
# vim: set ft=zsh ts=4 sw=4 et:
|
||||||
43
zsh/themes/josh.zsh-theme
Normal file
43
zsh/themes/josh.zsh-theme
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
grey='\e[0;90m'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$grey%}("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$grey%})"
|
||||||
|
|
||||||
|
function josh_prompt {
|
||||||
|
(( spare_width = ${COLUMNS} ))
|
||||||
|
prompt=" "
|
||||||
|
|
||||||
|
branch=$(current_branch)
|
||||||
|
ruby_version=$(rvm_prompt_info)
|
||||||
|
path_size=${#PWD}
|
||||||
|
branch_size=${#branch}
|
||||||
|
ruby_size=${#ruby_version}
|
||||||
|
user_machine_size=${#${(%):-%n@%m-}}
|
||||||
|
|
||||||
|
if [[ ${#branch} -eq 0 ]]
|
||||||
|
then (( ruby_size = ruby_size + 1 ))
|
||||||
|
else
|
||||||
|
(( branch_size = branch_size + 4 ))
|
||||||
|
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||||
|
(( branch_size = branch_size + 2 ))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
(( spare_width = ${spare_width} - (${user_machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) ))
|
||||||
|
|
||||||
|
while [ ${#prompt} -lt $spare_width ]; do
|
||||||
|
prompt=" $prompt"
|
||||||
|
done
|
||||||
|
|
||||||
|
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $(git_prompt_info)"
|
||||||
|
|
||||||
|
echo $prompt
|
||||||
|
}
|
||||||
|
|
||||||
|
setopt prompt_subst
|
||||||
|
|
||||||
|
PROMPT='
|
||||||
|
%n@%m $(josh_prompt)
|
||||||
|
%(?,%{%F{green}%},%{%F{red}%})⚡%{$reset_color%} '
|
||||||
16
zsh/themes/jreese.zsh-theme
Normal file
16
zsh/themes/jreese.zsh-theme
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png
|
||||||
|
|
||||||
|
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \
|
||||||
|
$(git_prompt_info)\
|
||||||
|
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
|
||||||
|
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||||
|
RPS1='${return_code}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="⚡"
|
||||||
|
|
||||||
13
zsh/themes/kennethreitz.zsh-theme
Normal file
13
zsh/themes/kennethreitz.zsh-theme
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
PROMPT='%{$fg[green]%}%c \
|
||||||
|
$(git_prompt_info)\
|
||||||
|
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
|
||||||
|
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||||
|
RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}:: %{$fg[yellow]%}("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}"
|
||||||
|
|
||||||
80
zsh/themes/linuxonly
Normal file
80
zsh/themes/linuxonly
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
# vim: set ts=2 textwidth=0
|
||||||
|
|
||||||
|
autoload -U add-zsh-hook
|
||||||
|
autoload -Uz vcs_info
|
||||||
|
local c0=$(printf "\033[0m")
|
||||||
|
local c1=$(printf "\033[38;5;215m")
|
||||||
|
local c2=$(printf "\033[38;5;209m")
|
||||||
|
local c3=$(printf "\033[38;5;203m")
|
||||||
|
local c4=$(printf "\033[33;4m")
|
||||||
|
local c5=$(printf "\033[38;5;137m")
|
||||||
|
local c6=$(printf "\033[38;5;240m")
|
||||||
|
local c7=$(printf "\033[38;5;149m")
|
||||||
|
local c8=$(printf "\033[38;5;126m")
|
||||||
|
local c9=$(printf "\033[38;5;162m")
|
||||||
|
|
||||||
|
local foopath=$(perl /home/scp1/bin/foopath)
|
||||||
|
|
||||||
|
if [ "$TERM" = "linux" ]; then
|
||||||
|
c1=$(printf "\033[34;1m")
|
||||||
|
c2=$(printf "\033[35m")
|
||||||
|
c3=$(printf "\033[31m")
|
||||||
|
c4=$(printf "\033[31;1m")
|
||||||
|
c5=$(printf "\033[32m")
|
||||||
|
c6=$(printf "\033[32;1m")
|
||||||
|
c7=$(printf "\033[33m")
|
||||||
|
c8=$(printf "\033[33;1m")
|
||||||
|
c9=$(printf "\033[34m")
|
||||||
|
fi
|
||||||
|
|
||||||
|
#local newtv=$(perl $HOME/devel/newtv.pl)
|
||||||
|
local newtv=''
|
||||||
|
|
||||||
|
zstyle ':vcs_info:*' actionformats \
|
||||||
|
'%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
|
||||||
|
zstyle ':vcs_info:*' formats \
|
||||||
|
"%{$c8%}%s%{$c7%}:%{$c7%}(%{$c9%}%b%{$c7%})%f "
|
||||||
|
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
|
||||||
|
zstyle ':vcs_info:*' enable git
|
||||||
|
|
||||||
|
add-zsh-hook precmd prompt_jnrowe_precmd
|
||||||
|
|
||||||
|
prompt_jnrowe_precmd () {
|
||||||
|
vcs_info
|
||||||
|
|
||||||
|
if [ "${vcs_info_msg_0_}" = "" ]; then
|
||||||
|
#dir_status="|%F{3}%n%F{7}@%F{3}%m%F{7}:%F{9}%l%f"
|
||||||
|
#dir_status="$c1%n%F{7}@%F{9}%m%F{7}:%F{12}%/"
|
||||||
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
|
#dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$foopath%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
|
|
||||||
|
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
|
||||||
|
> '
|
||||||
|
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
|
||||||
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
|
PROMPT='${vcs_info_msg_0_}
|
||||||
|
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
||||||
|
> '
|
||||||
|
|
||||||
|
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
|
||||||
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
|
|
||||||
|
PROMPT='${vcs_info_msg_0_}
|
||||||
|
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
|
||||||
|
%{$c9%}·>%{$c0%} '
|
||||||
|
else
|
||||||
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
|
PROMPT='${vcs_info_msg_0_}
|
||||||
|
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
||||||
|
> '
|
||||||
|
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$reset_color%} ${vcs_info_msg_0_}${dir_status}%{$reset_color%}
|
||||||
|
#> '
|
||||||
|
|
||||||
|
# vim: set ft=zsh ts=4 sw=4 et:
|
||||||
|
|
||||||
|
|
||||||
10
zsh/themes/lukerandall.zsh-theme
Normal file
10
zsh/themes/lukerandall.zsh-theme
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# ZSH Theme - Preview: http://cl.ly/f701d00760f8059e06dc
|
||||||
|
# Thanks to gallifrey, upon whose theme this is based
|
||||||
|
|
||||||
|
local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B»%b '
|
||||||
|
RPS1="${return_code}"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
|
||||||
11
zsh/themes/macovsky-modified-mine.zsh-theme
Normal file
11
zsh/themes/macovsky-modified-mine.zsh-theme
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
|
||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
PROMPT='%{$fg[green]%}%~%{$reset_color%}$(git_prompt_info)%{$reset_color%}%B$%b '
|
||||||
|
|
||||||
|
if [ -n $EMACS ]; then
|
||||||
|
RPS1="${return_code}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||||
8
zsh/themes/macovsky-ruby.zsh-theme
Normal file
8
zsh/themes/macovsky-ruby.zsh-theme
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
|
||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
|
||||||
|
RPS1="${return_code}"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||||
8
zsh/themes/macovsky.zsh-theme
Normal file
8
zsh/themes/macovsky.zsh-theme
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
|
||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
|
||||||
|
RPS1="${return_code}"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||||
6
zsh/themes/maran.zsh-theme
Normal file
6
zsh/themes/maran.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Theme with full path names and hostname
|
||||||
|
# Handy if you work on different servers all the time;
|
||||||
|
PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%} $(git_prompt_info) %(!.#.$) '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}git:("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
||||||
6
zsh/themes/mgutz.zsh-theme
Normal file
6
zsh/themes/mgutz.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
PROMPT='%{$fg_bold[magenta]%}%1~$(git_prompt_info) %{$fg_bold[magenta]%}%# %{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}["
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="*]"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="]"
|
||||||
23
zsh/themes/mikeh.zsh-theme
Normal file
23
zsh/themes/mikeh.zsh-theme
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
setopt prompt_subst
|
||||||
|
autoload colors
|
||||||
|
colors
|
||||||
|
|
||||||
|
autoload -U add-zsh-hook
|
||||||
|
autoload -Uz vcs_info
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
add-zsh-hook precmd mikeh_precmd
|
||||||
|
|
||||||
|
mikeh_precmd() {
|
||||||
|
vcs_info
|
||||||
|
}
|
||||||
|
|
||||||
|
# user, host, full path, and time/date
|
||||||
|
# on two lines for easier vgrepping
|
||||||
|
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
|
||||||
|
PROMPT=$'%{\e[0;34m%}%B..[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
|
||||||
|
%{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b '
|
||||||
|
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
|
||||||
10
zsh/themes/mine.zsh-theme
Normal file
10
zsh/themes/mine.zsh-theme
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
PROMPT='%{$fg[blue]%}%B%20~%b%{$reset_color%}$(git_prompt_info)%{$reset_color%} %B$%b '
|
||||||
|
|
||||||
|
if [ -n $EMACS ]; then
|
||||||
|
RPS1="${return_code}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[green]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="*%{$reset_color%}"
|
||||||
7
zsh/themes/mrtazz.zsh-theme
Normal file
7
zsh/themes/mrtazz.zsh-theme
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
PROMPT='%{$fg_bold[red]%}%m%{$reset_color%}:%{$fg[cyan]%}%c%{$reset_color%}:%# '
|
||||||
|
RPROMPT='%{$fg_bold[green]%}$(git_prompt_info)%{$reset_color%}% '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="<%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$fg[green]%}>%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}>"
|
||||||
14
zsh/themes/philips.zsh-theme
Normal file
14
zsh/themes/philips.zsh-theme
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||||
|
|
||||||
|
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
|
||||||
|
RPROMPT='[%*]'
|
||||||
|
|
||||||
|
# git theming
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}"
|
||||||
|
|
||||||
|
# LS colors, made with http://geoff.greer.fm/lscolors/
|
||||||
|
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||||
|
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
||||||
16
zsh/themes/pmcgee.zsh-theme
Normal file
16
zsh/themes/pmcgee.zsh-theme
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||||
|
|
||||||
|
PROMPT='
|
||||||
|
%{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%}
|
||||||
|
$(git_prompt_info)%(!.#.$) '
|
||||||
|
RPROMPT='[%*]'
|
||||||
|
|
||||||
|
# git theming
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}%B"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*"
|
||||||
|
|
||||||
|
# LS colors, made with http://geoff.greer.fm/lscolors/
|
||||||
|
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||||
|
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
||||||
8
zsh/themes/rgm.zsh-theme
Normal file
8
zsh/themes/rgm.zsh-theme
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
PROMPT='
|
||||||
|
%n@%m %{$fg[cyan]%}%~
|
||||||
|
%? $(git_prompt_info)%{$fg_bold[blue]%}%% %{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"
|
||||||
6
zsh/themes/risto.zsh-theme
Normal file
6
zsh/themes/risto.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# -*- sh -*- vim:set ft=sh ai et sw=4 sts=4:
|
||||||
|
# It might be bash like, but I can't have my co-workers knowing I use zsh
|
||||||
|
PROMPT='%{$fg[green]%}%n@%m:%{$fg_bold[blue]%}%2~ $(git_prompt_info)%{$reset_color%}%(!.#.$) '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$reset_color%}"
|
||||||
6
zsh/themes/robbyrussell.zsh-theme
Normal file
6
zsh/themes/robbyrussell.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||||
7
zsh/themes/skaro.zsh-theme
Normal file
7
zsh/themes/skaro.zsh-theme
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
PROMPT='%{$fg_bold[green]%}%h %{$fg[cyan]%}%2~ %{$fg_bold[blue]%}$(git_prompt_info) %{$reset_color%}» '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||||
|
|
||||||
13
zsh/themes/sporty_256.zsh-theme
Normal file
13
zsh/themes/sporty_256.zsh-theme
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# zsh theme requires 256 color enabled terminal
|
||||||
|
# i.e TERM=xterm-256color
|
||||||
|
# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/
|
||||||
|
# based on robbyrussell's shell but louder!
|
||||||
|
|
||||||
|
PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f
|
||||||
|
%{$fg_bold[white]%}%# %{$reset_color%}'
|
||||||
|
RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}±|%f%F{124}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%F{154}|"
|
||||||
27
zsh/themes/takashiyoshida.zsh-theme
Normal file
27
zsh/themes/takashiyoshida.zsh-theme
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#
|
||||||
|
# PROMPT
|
||||||
|
#
|
||||||
|
PROMPT_BRACKET_BEGIN='%{$fg_bold[white]%}['
|
||||||
|
PROMPT_HOST='%{$fg_bold[cyan]%}%m'
|
||||||
|
PROMPT_SEPARATOR='%{$reset_color%}:'
|
||||||
|
PROMPT_DIR='%{$fg_bold[yellow]%}%c'
|
||||||
|
PROMPT_BRACKET_END='%{$fg_bold[white]%}]'
|
||||||
|
|
||||||
|
PROMPT_USER='%{$fg_bold[white]%}%n'
|
||||||
|
PROMPT_SIGN='%{$reset_color%}%#'
|
||||||
|
|
||||||
|
GIT_PROMPT_INFO='$(git_prompt_info)'
|
||||||
|
|
||||||
|
# My current prompt looks like:
|
||||||
|
# [host:current_dir] (git_prompt_info)
|
||||||
|
# [username]%
|
||||||
|
PROMPT="${PROMPT_BRACKET_BEGIN}${PROMPT_HOST}${PROMPT_SEPARATOR}${PROMPT_DIR}${PROMPT_BRACKET_END}${GIT_PROMPT_INFO}
|
||||||
|
${PROMPT_BRACKET_BEGIN}${PROMPT_USER}${PROMPT_BRACKET_END}${PROMPT_SIGN} "
|
||||||
|
|
||||||
|
#
|
||||||
|
# Git repository
|
||||||
|
#
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=''
|
||||||
6
zsh/themes/theunraveler.zsh-theme
Normal file
6
zsh/themes/theunraveler.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Comment
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=' (git:'
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=')'
|
||||||
|
|
||||||
|
PROMPT='%{$fg[magenta]%}[%c]$(git_prompt_info) $ %{$reset_color%}'
|
||||||
29
zsh/themes/thomasjbradley.zsh-theme
Normal file
29
zsh/themes/thomasjbradley.zsh-theme
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
function prompt_char {
|
||||||
|
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||||
|
hg root >/dev/null 2>/dev/null && echo '☿' && return
|
||||||
|
echo '○'
|
||||||
|
}
|
||||||
|
|
||||||
|
function virtualenv_info {
|
||||||
|
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||||
|
}
|
||||||
|
|
||||||
|
function hg_prompt_info {
|
||||||
|
hg prompt --angle-brackets "\
|
||||||
|
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
|
||||||
|
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
|
||||||
|
%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
|
||||||
|
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT='
|
||||||
|
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
|
||||||
|
$(virtualenv_info)$(prompt_char) '
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
. ~/bin/dotfiles/zsh/aliases
|
||||||
12
zsh/themes/tonotdo.zsh-theme
Normal file
12
zsh/themes/tonotdo.zsh-theme
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}➜%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» '
|
||||||
|
RPROMPT='[%*]'
|
||||||
|
|
||||||
|
# git theming
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})"
|
||||||
|
|
||||||
|
# LS colors, made with http://geoff.greer.fm/lscolors/
|
||||||
|
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||||
|
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
||||||
7
zsh/themes/wezm+.zsh-theme
Normal file
7
zsh/themes/wezm+.zsh-theme
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
PROMPT='%{${fg_bold[yellow]}%}%n%{$reset_color%}%{${fg[yellow]}%}@%m%{$reset_color%} $(git_prompt_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} '
|
||||||
|
RPROMPT='%{$fg[green]%}%~%{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[red]%}✗%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||||
7
zsh/themes/wezm.zsh-theme
Normal file
7
zsh/themes/wezm.zsh-theme
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
PROMPT='$(git_prompt_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} '
|
||||||
|
RPROMPT='%{$fg[green]%}%~%{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[red]%}⚡%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||||
6
zsh/themes/xiong-chiamiov-plus.zsh-theme
Normal file
6
zsh/themes/xiong-chiamiov-plus.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# user, host, full path, and time/date
|
||||||
|
# on two lines for easier vgrepping
|
||||||
|
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
|
||||||
|
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
|
||||||
|
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(git_prompt_info)>%{\e[0m%}%b '
|
||||||
|
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
|
||||||
6
zsh/themes/xiong-chiamiov.zsh-theme
Normal file
6
zsh/themes/xiong-chiamiov.zsh-theme
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# user, host, full path, and time/date
|
||||||
|
# on two lines for easier vgrepping
|
||||||
|
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
|
||||||
|
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
|
||||||
|
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b '
|
||||||
|
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
|
||||||
15
zsh/zsh.sh
Normal file
15
zsh/zsh.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Initializes Oh My Zsh
|
||||||
|
|
||||||
|
# add a function path
|
||||||
|
fpath=($ZSH/functions $fpath)
|
||||||
|
|
||||||
|
# Load all of the config files in ~/oh-my-zsh that end in .zsh
|
||||||
|
# TIP: Add files you don't want in git to .gitignore
|
||||||
|
for config_file ($ZSH/lib/*.zsh) source $config_file
|
||||||
|
|
||||||
|
# Load all of your custom configurations from custom/
|
||||||
|
for config_file ($ZSH/custom/*.zsh) source $config_file
|
||||||
|
|
||||||
|
# Load all of the plugins that were defined in ~/.zshrc
|
||||||
|
plugin=${plugin:=()}
|
||||||
|
for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh
|
||||||
21
zsh/zshalias
21
zsh/zshalias
@@ -1,21 +0,0 @@
|
|||||||
# general stuff
|
|
||||||
#
|
|
||||||
alias ls="ls --color=auto -T 0"
|
|
||||||
|
|
||||||
# defining alias for development
|
|
||||||
|
|
||||||
# tomcat
|
|
||||||
alias tcup="tomcat.sh start"
|
|
||||||
alias tcdw="tomcat.sh stop"
|
|
||||||
alias tcre="tomcat.sh restart"
|
|
||||||
alias tclog="tomcat.sh log"
|
|
||||||
alias cdtc="cd $CATALINA_HOME"
|
|
||||||
|
|
||||||
# sling
|
|
||||||
alias sllog="slinglog.sh"
|
|
||||||
alias cdsl="cd $SLING_HOME"
|
|
||||||
|
|
||||||
#java
|
|
||||||
alias cdj="cd $JAVA_HOME"
|
|
||||||
alias psjava="ps aux | grep java | grep -v grep"
|
|
||||||
alias killjava="skill -9 java"
|
|
||||||
119
zshrc
119
zshrc
@@ -1,119 +0,0 @@
|
|||||||
# my own confs
|
|
||||||
|
|
||||||
# vim keyset
|
|
||||||
bindkey -v
|
|
||||||
|
|
||||||
# no freakin' beeeep
|
|
||||||
unsetopt beep
|
|
||||||
|
|
||||||
# History
|
|
||||||
HISTFILE=~/.histfile
|
|
||||||
HISTSIZE=1000
|
|
||||||
SAVEHIST=1000
|
|
||||||
|
|
||||||
setopt EXTENDED_HISTORY
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
|
||||||
setopt HIST_NO_FUNCTIONS
|
|
||||||
setopt HIST_REDUCE_BLANKS
|
|
||||||
|
|
||||||
setopt INC_APPEND_HISTORY
|
|
||||||
setopt SHARE_HISTORY
|
|
||||||
|
|
||||||
setopt HIST_VERIFY
|
|
||||||
|
|
||||||
|
|
||||||
## get keys working
|
|
||||||
bindkey "^[[2~" yank # Insert
|
|
||||||
bindkey "^[[3~" delete-char # Del
|
|
||||||
bindkey "^[[5~" up-line-or-history # PageUp
|
|
||||||
bindkey "^[[6~" down-line-or-history # PageDown
|
|
||||||
bindkey "^[E" expand-cmd-path # C-e for expanding path of typed command.
|
|
||||||
bindkey "^[[A" up-line-or-search # Up arrow for back-history-search.
|
|
||||||
bindkey "^[[B" down-line-or-search # Down arrow for fwd-history-search.
|
|
||||||
bindkey " " magic-space # Do history expansion on space.
|
|
||||||
case "$TERM" in
|
|
||||||
linux|screen)
|
|
||||||
bindkey "^[[1~" beginning-of-line # Pos1
|
|
||||||
bindkey "^[[4~" end-of-line # End
|
|
||||||
;;
|
|
||||||
*xterm*|(dt|k)term)
|
|
||||||
bindkey "\eOH" beginning-of-line # Pos1
|
|
||||||
bindkey "\eOF" end-of-line # End
|
|
||||||
bindkey "^[[H" beginning-of-line # Pos1
|
|
||||||
bindkey "^[[F" end-of-line # End
|
|
||||||
bindkey "^[[7~" beginning-of-line # Pos1
|
|
||||||
bindkey "^[[8~" end-of-line # End
|
|
||||||
;;
|
|
||||||
rxvt|Eterm)
|
|
||||||
bindkey "^[[7~" beginning-of-line # Pos1
|
|
||||||
bindkey "^[[8~" end-of-line # End
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
# Completion
|
|
||||||
zmodload -i zsh/complist
|
|
||||||
|
|
||||||
# display colored directory entries
|
|
||||||
# display current dircolors with dircolors -p
|
|
||||||
if [ -f ${HOME}/.dir_colors ] ; then
|
|
||||||
eval $(dircolors -b ${HOME}/.dir_colors)
|
|
||||||
elif [ -f /etc/DIR_COLORS ] ; then
|
|
||||||
eval $(dircolors -b /etc/DIR_COLORS)
|
|
||||||
fi
|
|
||||||
|
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
|
||||||
zstyle ':completion:*:*:kill:*' list-colors '=%*=01;31'
|
|
||||||
|
|
||||||
# Load the completion system
|
|
||||||
autoload -U compinit
|
|
||||||
compinit
|
|
||||||
zstyle ':completion:*:*:kill:*:jobs' verbose yes
|
|
||||||
|
|
||||||
autoload -U sched
|
|
||||||
|
|
||||||
# insert all expansions for expand completer
|
|
||||||
zstyle ':completion:*:expand:*' tag-order all-expansions
|
|
||||||
|
|
||||||
# formatting and messages
|
|
||||||
zstyle ':completion:*' verbose yes
|
|
||||||
zstyle ':completion:*:descriptions' format '%B%d%b'
|
|
||||||
zstyle ':completion:*:messages' format '%d'
|
|
||||||
zstyle ':completion:*:warnings' format 'No matches for: %d'
|
|
||||||
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
|
|
||||||
zstyle ':completion:*' group-name ''
|
|
||||||
|
|
||||||
# turns off spelling correction for commands
|
|
||||||
setopt nocorrect
|
|
||||||
# ORRECTALL option turns on spelling correction for all arguments
|
|
||||||
setopt nocorrectall
|
|
||||||
|
|
||||||
setopt interactivecomments
|
|
||||||
|
|
||||||
setopt extendedglob
|
|
||||||
|
|
||||||
setopt EXTENDEDGLOB # file globbing is awesome
|
|
||||||
setopt AUTOMENU # Tab-completion should cycle.
|
|
||||||
setopt AUTOLIST # ... and list the possibilities.
|
|
||||||
setopt AUTO_PARAM_SLASH # Make directories pretty.
|
|
||||||
setopt ALWAYS_TO_END # Push that cursor on completions.
|
|
||||||
setopt AUTOCD # jump to the directory.
|
|
||||||
setopt NO_BEEP # self explanatory
|
|
||||||
setopt AUTO_NAME_DIRS # change directories to variable names
|
|
||||||
setopt CHASE_LINKS # if you pwd from a symlink, you get the actual path
|
|
||||||
setopt AUTO_CONTINUE # automatically sent a CONT signal by disown
|
|
||||||
setopt LONG_LIST_JOBS # List jobs in the long format by default
|
|
||||||
|
|
||||||
|
|
||||||
# set the prompt from phil http://aperiodic.net/phil/prompt/
|
|
||||||
. $HOME/.zsh/prompt
|
|
||||||
|
|
||||||
if [ -f $HOME/.local_profile ] ; then
|
|
||||||
. $HOME/.local_profile
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Alias
|
|
||||||
|
|
||||||
if [ -f $HOME/.zsh/zshalias ] ; then
|
|
||||||
. $HOME/.zsh/zshalias
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user