From c103c15e5c9a51c655d503256bfd005530e5baf6 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Thu, 29 Oct 2009 23:18:19 +0100 Subject: [PATCH 01/16] Added my theme --- themes/tonotdo.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/tonotdo.zsh-theme diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme new file mode 100644 index 000000000..6e864f5ac --- /dev/null +++ b/themes/tonotdo.zsh-theme @@ -0,0 +1,7 @@ +# Inspired by many other themes +PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~$(git_prompt_info)%{$reset_color%} » ' + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[blue]%}git(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$fg[blue]%})" From f11366374c233fd37b7df3b98240cac96ee1cf9f Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 30 Oct 2009 18:15:45 +0100 Subject: [PATCH 02/16] Small fix, probably the smallest possible --- themes/tonotdo.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index 6e864f5ac..1562b72bc 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,5 +1,5 @@ # Inspired by many other themes -PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~$(git_prompt_info)%{$reset_color%} » ' +PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[blue]%}git(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="" From 8beb5a50f1e442733a624de73dedff99170b6b71 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 30 Oct 2009 20:41:38 +0100 Subject: [PATCH 03/16] Skip the git word in this theme --- themes/tonotdo.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index 1562b72bc..dca651674 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,7 +1,7 @@ # Inspired by many other themes PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' -ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[blue]%}git(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$fg[blue]%})" From e2dba2c3e94115829e9172294410cae4aedc7e96 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Wed, 4 Nov 2009 20:37:18 +0100 Subject: [PATCH 04/16] Joined the appearance so the theme can apply LSCOLORS too --- lib/aliases.zsh | 2 +- lib/appearance.zsh | 34 ++++++++++++++++++++++++++++++++++ lib/colors.zsh | 4 ---- lib/git.zsh | 11 ----------- lib/misc.zsh | 4 ++++ lib/prompt.zsh | 25 ------------------------- 6 files changed, 39 insertions(+), 41 deletions(-) create mode 100644 lib/appearance.zsh delete mode 100644 lib/colors.zsh delete mode 100644 lib/prompt.zsh diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 6667a6724..c3a6cf073 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -45,7 +45,7 @@ alias gcp='git cherry-pick' alias history='fc -l 1' # List direcory contents -alias ls='ls -F' +alias ls='ls -F -G' alias lsa='ls -lahG' alias l='ls -la' alias ll='ls -alr' diff --git a/lib/appearance.zsh b/lib/appearance.zsh new file mode 100644 index 000000000..b1f5a8a38 --- /dev/null +++ b/lib/appearance.zsh @@ -0,0 +1,34 @@ +# Colors +autoload colors; colors; +export LSCOLORS="Gxfxcxdxbxegedabagacad" + +#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 - Prefix at the very beginning of the prompt, before the branch name +ZSH_THEME_GIT_PROMPT_PREFIX="git:(" +# ZSH_THEME_GIT_PROMPT_SUFFIX - At the very end of the prompt +ZSH_THEME_GIT_PROMPT_SUFFIX=")" +# ZSH_THEME_GIT_PROMPT_DIRTY - Text to display if the branch is dirty +ZSH_THEME_GIT_PROMPT_DIRTY="*" +# ZSH_THEME_GIT_PROMPT_CLEAN - Text to display if the branch is clean +ZSH_THEME_GIT_PROMPT_CLEAN="" + +# Setup the prompt with pretty colors +setopt prompt_subst + +# Load the theme +source "$ZSH/themes/$ZSH_THEME.zsh-theme" \ No newline at end of file diff --git a/lib/colors.zsh b/lib/colors.zsh deleted file mode 100644 index b2b08f929..000000000 --- a/lib/colors.zsh +++ /dev/null @@ -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' diff --git a/lib/git.zsh b/lib/git.zsh index 9409c92db..84a3af0b9 100644 --- a/lib/git.zsh +++ b/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 function git_prompt_info() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return diff --git a/lib/misc.zsh b/lib/misc.zsh index a01627d9e..4c1743657 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -7,3 +7,7 @@ bindkey "^[m" copy-prev-shell-word ## jobs setopt long_list_jobs + +## pager +export PAGER=less +export LC_CTYPE=en_US.UTF-8 diff --git a/lib/prompt.zsh b/lib/prompt.zsh deleted file mode 100644 index 39689684f..000000000 --- a/lib/prompt.zsh +++ /dev/null @@ -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" From 1c65ab9dea8caf834d662d3d20e3b8a83ea609b0 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Thu, 5 Nov 2009 20:30:53 +0100 Subject: [PATCH 05/16] added LSCOLORS --- themes/tonotdo.zsh-theme | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index dca651674..f1e9a286a 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,7 +1,12 @@ # Inspired by many other themes -PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' +PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~%{$(git_prompt_info)%}%{$reset_color%}» ' +# git theming ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$fg[blue]%})" + +# LS colors, made with http://geoff.greer.fm/lscolors/ +export LSCOLORS="Gxfxcxdxbxegedabagacad" +export LS_COLORS="di=1;;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:" From 08fcf7dc393d6254fdcd7eef26d3f4ddd1c53a6c Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Thu, 5 Nov 2009 20:44:28 +0100 Subject: [PATCH 06/16] Enabled colors in ls and made it possible to theme them --- lib/aliases.zsh | 3 +-- lib/appearance.zsh | 21 ++++++++++++--------- templates/zshrc.zsh-template | 5 ++++- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index c3a6cf073..88d68e142 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -45,8 +45,7 @@ alias gcp='git cherry-pick' alias history='fc -l 1' # List direcory contents -alias ls='ls -F -G' -alias lsa='ls -lahG' +alias lsa='ls -lah' alias l='ls -la' alias ll='ls -alr' alias sl=ls # often screw this up diff --git a/lib/appearance.zsh b/lib/appearance.zsh index b1f5a8a38..c9bd25d81 100644 --- a/lib/appearance.zsh +++ b/lib/appearance.zsh @@ -1,6 +1,13 @@ -# Colors +# 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 @@ -18,14 +25,10 @@ fi PS1="%n@%m:%~%# " # git theming default: Variables for theming 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_PREFIX="git:(" -# ZSH_THEME_GIT_PROMPT_SUFFIX - At the very end of the prompt -ZSH_THEME_GIT_PROMPT_SUFFIX=")" -# ZSH_THEME_GIT_PROMPT_DIRTY - Text to display if the branch is dirty -ZSH_THEME_GIT_PROMPT_DIRTY="*" -# ZSH_THEME_GIT_PROMPT_CLEAN - Text to display if the branch is clean -ZSH_THEME_GIT_PROMPT_CLEAN="" +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 diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 7c43303bd..d905be04b 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -9,7 +9,10 @@ export ZSH_THEME="robbyrussell" # export CASE_SENSITIVE="true" # 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 From bbef2db92b39c41705e0a3f05da525b5b1eb8901 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Thu, 5 Nov 2009 20:48:08 +0100 Subject: [PATCH 07/16] parse error fix --- lib/appearance.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/appearance.zsh b/lib/appearance.zsh index c9bd25d81..ffee52b5e 100644 --- a/lib/appearance.zsh +++ b/lib/appearance.zsh @@ -4,7 +4,8 @@ export LSCOLORS="Gxfxcxdxbxegedabagacad" #export LS_COLORS # Enable ls colors -if [ "$DISABLE_LS_COLORS" != "true" ] then +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 From 147f1dc70212662fc60a5c21f87dda6b22993c74 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Mon, 9 Nov 2009 21:38:40 +0100 Subject: [PATCH 08/16] Modifying changes for issue 25, to fix issue 27 --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 6ef950f12..58d826d0c 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -5,7 +5,7 @@ function git_prompt_info() { } 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" else echo "$ZSH_THEME_GIT_PROMPT_CLEAN" From 5246e103c54b7e503cb0c7a715a9d88dc5a4f0e1 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Mon, 9 Nov 2009 22:05:00 +0100 Subject: [PATCH 09/16] Fixed all themes so tab-completion doesn't move the cursor to a weird position --- themes/garyblessington.zsh-theme | 2 +- themes/maran.zsh-theme | 2 +- themes/tonotdo.zsh-theme | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/garyblessington.zsh-theme b/themes/garyblessington.zsh-theme index 9431be6d8..b4f84a71c 100644 --- a/themes/garyblessington.zsh-theme +++ b/themes/garyblessington.zsh-theme @@ -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_SUFFIX="%{$reset_color%}" diff --git a/themes/maran.zsh-theme b/themes/maran.zsh-theme index 0f6e3b6bd..6fba04688 100644 --- a/themes/maran.zsh-theme +++ b/themes/maran.zsh-theme @@ -1,6 +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) %(!.#.$) ' +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%}" diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index f1e9a286a..07f149ba9 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,5 +1,5 @@ # Inspired by many other themes -PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~%{$(git_prompt_info)%}%{$reset_color%}» ' +PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' # git theming ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}" From e41d7305e55d144c324ba1adf1cf852e576457fc Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Mon, 9 Nov 2009 22:28:17 +0100 Subject: [PATCH 10/16] Improved the LS_COLORS in my tonotdo theme --- themes/tonotdo.zsh-theme | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index 07f149ba9..2462971e0 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -9,4 +9,13 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$fg[blue]%})" # LS colors, made with http://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" -export LS_COLORS="di=1;;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:" +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:' \ No newline at end of file From 80c20c32ddabac0ea590aba394a7b74128521508 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Wed, 11 Nov 2009 17:26:23 +0100 Subject: [PATCH 11/16] LS_COLORS fix for tonotdo theme --- themes/tonotdo.zsh-theme | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index 2462971e0..de3206910 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -9,13 +9,4 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$fg[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:' \ No newline at end of file +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:' \ No newline at end of file From b4712ad693ca38e44e8b1f98308bab152f9c570c Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Wed, 11 Nov 2009 18:14:25 +0100 Subject: [PATCH 12/16] Spiced up the tonotdo theme --- themes/tonotdo.zsh-theme | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index de3206910..f46d165da 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,11 +1,11 @@ -# Inspired by many other themes -PROMPT='[%*] %{$fg[cyan]%}%n%{$fg[magenta]%}➜%{$fg[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' +PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[yellow]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' +RPROMPT='[%*]' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[magenta]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$fg[blue]%})" +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" From 9fde1531f379449faa4f103d8493e8d2665e3055 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Wed, 11 Nov 2009 18:15:33 +0100 Subject: [PATCH 13/16] Spiced up the tonotdo theme, some more --- themes/tonotdo.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index f46d165da..478f01de7 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,8 +1,8 @@ -PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[yellow]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' +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[magenta]%}" +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]%})" From 81acebee57d3afdf5afea377b68ba671bba58f6e Mon Sep 17 00:00:00 2001 From: technoweenie Date: Thu, 12 Nov 2009 11:14:09 -0700 Subject: [PATCH 14/16] gave credit to Nick for the rake autocompletion code. --- README.textile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.textile b/README.textile index 9972cf246..950f8861b 100644 --- a/README.textile +++ b/README.textile @@ -56,8 +56,9 @@ If you want to uninstall it, just run @uninstall_oh_my_zsh@ from the command lin h2. Thanks -* Rick Olsen (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. +* Rick Olson (technoweenie) might remember some of the configuration, which I took from a pastie 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! @@ -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: -* need to make the title bar support git folder -* \ No newline at end of file +* need to make the title bar support git folder \ No newline at end of file From b549dd49991b87e16aa3c7225d47e435969d46fe Mon Sep 17 00:00:00 2001 From: Jordan Bracco Date: Fri, 13 Nov 2009 05:10:21 +0100 Subject: [PATCH 15/16] Gallifrey theme --- themes/gallifrey.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/gallifrey.zsh-theme diff --git a/themes/gallifrey.zsh-theme b/themes/gallifrey.zsh-theme new file mode 100644 index 000000000..fce7cb923 --- /dev/null +++ b/themes/gallifrey.zsh-theme @@ -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%}" From 473dd3b2121ae0e54803098a7fde4b4c1e673145 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Wed, 25 Nov 2009 12:45:16 -0800 Subject: [PATCH 16/16] Adding current_branch function, which can be used like: git pull origin master --- lib/git.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/git.zsh b/lib/git.zsh index 58d826d0c..52c7969f3 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -12,3 +12,11 @@ parse_git_dirty () { 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/} +}