Browse code

Merge branch 'nicoulaj-theme' of https://github.com/nicoulaj/oh-my-zsh into nicoulaj-nicoulaj-theme

Robby Russell authored on 22/02/2011 at 05:45:00
Showing 3 changed files
1 1
deleted file mode 100644
... ...
@@ -1,36 +0,0 @@
1
-# ls colors
2
-autoload colors; colors;
3
-export LSCOLORS="Gxfxcxdxbxegedabagacad"
4
-#export LS_COLORS
5
-
6
-# Enable ls colors
7
-if [ "$DISABLE_LS_COLORS" != "true" ]
8
-then
9
-  # Find the option for using colors in ls, depending on the version: Linux or BSD
10
-  ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
11
-fi
12
-
13
-#setopt no_beep
14
-setopt auto_cd
15
-setopt multios
16
-setopt cdablevarS
17
-
18
-if [[ x$WINDOW != x ]]
19
-then
20
-    SCREEN_NO="%B$WINDOW%b "
21
-else
22
-    SCREEN_NO=""
23
-fi
24
-
25
-# Apply theming defaults
26
-PS1="%n@%m:%~%# "
27
-
28
-# git theming default: Variables for theming the git info prompt
29
-ZSH_THEME_GIT_PROMPT_PREFIX="git:("         # Prefix at the very beginning of the prompt, before the branch name
30
-ZSH_THEME_GIT_PROMPT_SUFFIX=")"             # At the very end of the prompt
31
-ZSH_THEME_GIT_PROMPT_DIRTY="*"              # Text to display if the branch is dirty
32
-ZSH_THEME_GIT_PROMPT_CLEAN=""               # Text to display if the branch is clean
33
-
34
-# Setup the prompt with pretty colors
35
-setopt prompt_subst
36
-
37 1
new file mode 100644
... ...
@@ -0,0 +1,36 @@
0
+# ls colors
1
+autoload colors; colors;
2
+export LSCOLORS="Gxfxcxdxbxegedabagacad"
3
+#export LS_COLORS
4
+
5
+# Enable ls colors
6
+if [ "$DISABLE_LS_COLORS" != "true" ]
7
+then
8
+  # Find the option for using colors in ls, depending on the version: Linux or BSD
9
+  ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
10
+fi
11
+
12
+#setopt no_beep
13
+setopt auto_cd
14
+setopt multios
15
+setopt cdablevarS
16
+
17
+if [[ x$WINDOW != x ]]
18
+then
19
+    SCREEN_NO="%B$WINDOW%b "
20
+else
21
+    SCREEN_NO=""
22
+fi
23
+
24
+# Apply theming defaults
25
+PS1="%n@%m:%~%# "
26
+
27
+# git theming default: Variables for theming the git info prompt
28
+ZSH_THEME_GIT_PROMPT_PREFIX="git:("         # Prefix at the very beginning of the prompt, before the branch name
29
+ZSH_THEME_GIT_PROMPT_SUFFIX=")"             # At the very end of the prompt
30
+ZSH_THEME_GIT_PROMPT_DIRTY="*"              # Text to display if the branch is dirty
31
+ZSH_THEME_GIT_PROMPT_CLEAN=""               # Text to display if the branch is clean
32
+
33
+# Setup the prompt with pretty colors
34
+setopt prompt_subst
35
+
0 36
new file mode 100644
... ...
@@ -0,0 +1,43 @@
0
+#!/usr/bin/env zsh
1
+# ------------------------------------------------------------------------------
2
+# Prompt for the Zsh shell:
3
+#   * One line.
4
+#   * VCS info on the right prompt.
5
+#   * Only shows the path on the left prompt by default.
6
+#   * Crops the path to a defined length and only shows the path relative to
7
+#     the current VCS repository root.
8
+#   * Wears a different color wether the last command succeeded/failed.
9
+#   * Shows user@hostname if connected through SSH.
10
+#   * Shows if logged in as root or not.
11
+# ------------------------------------------------------------------------------
12
+
13
+# Customizable parameters.
14
+PROMPT_PATH_MAX_LENGTH=30
15
+PROMPT_DEFAULT_END=❯
16
+PROMPT_ROOT_END=❯❯❯
17
+PROMPT_SUCCESS_COLOR=$FG[071]
18
+PROMPT_FAILURE_COLOR=$FG[124]
19
+PROMPT_VCS_INFO_COLOR=$FG[242]
20
+
21
+# Set required options.
22
+setopt promptsubst
23
+
24
+# Load required modules.
25
+autoload -U add-zsh-hook
26
+autoload -Uz vcs_info
27
+
28
+# Add hook for calling vcs_info before each command.
29
+add-zsh-hook precmd vcs_info
30
+
31
+# Set vcs_info parameters.
32
+zstyle ':vcs_info:*' enable hg bzr git
33
+zstyle ':vcs_info:*:*' check-for-changes true # Can be slow on big repos.
34
+zstyle ':vcs_info:*:*' unstagedstr '!'
35
+zstyle ':vcs_info:*:*' stagedstr '+'
36
+zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)"
37
+zstyle ':vcs_info:*:*' formats "%S" "%r/%s/%b %u%c"
38
+zstyle ':vcs_info:*:*' nvcsformats "%~" ""
39
+
40
+# Define prompts.
41
+PROMPT="%(0?.%{$PROMPT_SUCCESS_COLOR%}.%{$PROMPT_FAILURE_COLOR%})${SSH_TTY:+[%n@%m]}%{$FX[bold]%}%$PROMPT_PATH_MAX_LENGTH<..<"'${vcs_info_msg_0_%%.}'"%<<%(!.$PROMPT_ROOT_END.$PROMPT_DEFAULT_END)%{$FX[no-bold]%}%{$FX[reset]%} "
42
+RPROMPT="%{$PROMPT_VCS_INFO_COLOR%}"'$vcs_info_msg_1_'"%{$FX[reset]%}"