mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Merge remote branch 'upstream/master'
This commit is contained in:
commit
be0f9fbbc5
12 changed files with 82 additions and 50 deletions
|
|
@ -56,8 +56,9 @@ If you want to uninstall it, just run @uninstall_oh_my_zsh@ from the command lin
|
||||||
|
|
||||||
h2. Thanks
|
h2. Thanks
|
||||||
|
|
||||||
* Rick Olsen (technoweenie) might remember some of the configuration, which I took from a pastie a few years ago.
|
* Rick Olson (technoweenie) might remember some of the configuration, which I took from a pastie a few years ago.
|
||||||
* Whoever created the rake autocomplete stuff, which was posted all over the internet a few years ago.
|
* Marcel (noradio) provided Rick the original zsh configuration.
|
||||||
|
* Nicholas (ulysses) for the "rake autocompletion code":http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh.
|
||||||
|
|
||||||
h2. Help out!
|
h2. Help out!
|
||||||
|
|
||||||
|
|
@ -69,5 +70,4 @@ I'm hoping to collect a bunch of themes for our command prompts. You can see exi
|
||||||
|
|
||||||
h3. Todo from imajes:
|
h3. Todo from imajes:
|
||||||
|
|
||||||
* need to make the title bar support git folder
|
* need to make the title bar support git folder
|
||||||
*
|
|
||||||
|
|
@ -44,8 +44,7 @@ alias gcp='git cherry-pick'
|
||||||
alias history='fc -l 1'
|
alias history='fc -l 1'
|
||||||
|
|
||||||
# List direcory contents
|
# List direcory contents
|
||||||
alias ls='ls -F'
|
alias lsa='ls -lah'
|
||||||
alias lsa='ls -lahG'
|
|
||||||
alias l='ls -la'
|
alias l='ls -la'
|
||||||
alias ll='ls -alr'
|
alias ll='ls -alr'
|
||||||
alias sl=ls # often screw this up
|
alias sl=ls # often screw this up
|
||||||
|
|
|
||||||
38
lib/appearance.zsh
Normal file
38
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"
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
autoload colors; colors;
|
|
||||||
|
|
||||||
unset LSCOLORS
|
|
||||||
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
|
|
||||||
21
lib/git.zsh
21
lib/git.zsh
|
|
@ -1,14 +1,3 @@
|
||||||
# Varables for themeing the git info prompt:
|
|
||||||
# ZSH_THEME_GIT_PROMPT_PREFIX - 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
|
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:("
|
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY="*"
|
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
|
||||||
|
|
||||||
# get the name of the branch we are on
|
# get the name of the branch we are on
|
||||||
function git_prompt_info() {
|
function git_prompt_info() {
|
||||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||||
|
|
@ -16,10 +5,18 @@ function git_prompt_info() {
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_git_dirty () {
|
parse_git_dirty () {
|
||||||
if [[ $((git status &> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then
|
if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||||
else
|
else
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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/}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,7 @@ bindkey "^[m" copy-prev-shell-word
|
||||||
|
|
||||||
## jobs
|
## jobs
|
||||||
setopt long_list_jobs
|
setopt long_list_jobs
|
||||||
|
|
||||||
|
## pager
|
||||||
|
export PAGER=less
|
||||||
|
export LC_CTYPE=en_US.UTF-8
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
export PAGER=less
|
|
||||||
export LC_CTYPE=en_US.UTF-8
|
|
||||||
|
|
||||||
# speed stuff.
|
|
||||||
|
|
||||||
#setopt no_beep
|
|
||||||
setopt auto_cd
|
|
||||||
setopt multios
|
|
||||||
setopt cdablevarS
|
|
||||||
|
|
||||||
if [[ x$WINDOW != x ]]
|
|
||||||
then
|
|
||||||
SCREEN_NO="%B$WINDOW%b "
|
|
||||||
else
|
|
||||||
SCREEN_NO=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
PS1="%n@%m:%~%# "
|
|
||||||
|
|
||||||
# Setup the prompt with pretty colors
|
|
||||||
setopt prompt_subst
|
|
||||||
|
|
||||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
|
||||||
|
|
||||||
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
|
||||||
|
|
@ -9,7 +9,10 @@ export ZSH_THEME="robbyrussell"
|
||||||
# export CASE_SENSITIVE="true"
|
# export CASE_SENSITIVE="true"
|
||||||
|
|
||||||
# Comment this out to disable weekly auto-update checks
|
# Comment this out to disable weekly auto-update checks
|
||||||
# export DISABLE_AUTO_UPDATE="false"
|
# export DISABLE_AUTO_UPDATE="true"
|
||||||
|
|
||||||
|
# Uncomment following line if you want to disable colors in ls
|
||||||
|
# export DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
|
|
||||||
8
themes/gallifrey.zsh-theme
Normal file
8
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%}"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
PROMPT='%{%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}: '
|
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_PREFIX="(%{$fg[blue]%}"
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Theme with full path names and hostname
|
# Theme with full path names and hostname
|
||||||
# Handy if you work on different servers all the time;
|
# 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) %(!.#.$) '
|
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_PREFIX=" %{$fg[cyan]%}git:("
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
||||||
|
|
|
||||||
12
themes/tonotdo.zsh-theme
Normal file
12
themes/tonotdo.zsh-theme
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[yellow]%}•%{$fg_no_bold[magenta]%}%3~$(git_prompt_info)%{$reset_color%}» '
|
||||||
|
RPROMPT='[%*]'
|
||||||
|
|
||||||
|
# git theming
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[green]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}⚡%{$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:'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue