452eeed890084d7a9e776fa888c3f6c9695fa2d2

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

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

Diff

 1diff --git a/lib/appearance.zsh b/lib/theme-and-appearance.zsh
 2rename from lib/appearance.zsh
 3rename to lib/theme-and-appearance.zsh
 4diff --git a/themes/nicoulaj.zsh-theme b/themes/nicoulaj.zsh-theme
 5new file mode 100644
 6index 0000000000000000000000000000000000000000..333aa5e702e65256e0a73e0cef28effe65448964
 7--- /dev/null
 8+++ b/themes/nicoulaj.zsh-theme
 9@@ -0,0 +1,43 @@
10+#!/usr/bin/env zsh
11+# ------------------------------------------------------------------------------
12+# Prompt for the Zsh shell:
13+#   * One line.
14+#   * VCS info on the right prompt.
15+#   * Only shows the path on the left prompt by default.
16+#   * Crops the path to a defined length and only shows the path relative to
17+#     the current VCS repository root.
18+#   * Wears a different color wether the last command succeeded/failed.
19+#   * Shows user@hostname if connected through SSH.
20+#   * Shows if logged in as root or not.
21+# ------------------------------------------------------------------------------
22+
23+# Customizable parameters.
24+PROMPT_PATH_MAX_LENGTH=30
25+PROMPT_DEFAULT_END=❯
26+PROMPT_ROOT_END=❯❯❯
27+PROMPT_SUCCESS_COLOR=$FG[071]
28+PROMPT_FAILURE_COLOR=$FG[124]
29+PROMPT_VCS_INFO_COLOR=$FG[242]
30+
31+# Set required options.
32+setopt promptsubst
33+
34+# Load required modules.
35+autoload -U add-zsh-hook
36+autoload -Uz vcs_info
37+
38+# Add hook for calling vcs_info before each command.
39+add-zsh-hook precmd vcs_info
40+
41+# Set vcs_info parameters.
42+zstyle ':vcs_info:*' enable hg bzr git
43+zstyle ':vcs_info:*:*' check-for-changes true # Can be slow on big repos.
44+zstyle ':vcs_info:*:*' unstagedstr '!'
45+zstyle ':vcs_info:*:*' stagedstr '+'
46+zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)"
47+zstyle ':vcs_info:*:*' formats "%S" "%r/%s/%b %u%c"
48+zstyle ':vcs_info:*:*' nvcsformats "%~" ""
49+
50+# Define prompts.
51+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]%} "
52+RPROMPT="%{$PROMPT_VCS_INFO_COLOR%}"'$vcs_info_msg_1_'"%{$FX[reset]%}"