summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorEduardo Pedroni <e.pedroni91@gmail.com>2018-04-15 13:31:31 +0200
committerEduardo Pedroni <e.pedroni91@gmail.com>2018-04-15 13:31:31 +0200
commit66eac40675f320d859291fac6b4944a095c8d7d2 (patch)
treef5c7a1b8d77971e77b9617f789a084814c9f8a6a /.zshrc
parentf83e3aa0c9e1472e52473ecaa2097b596638dda2 (diff)
Renamed .zprofile to .zlogin for compatibility with the options file, added options file and support for it in .zshrc
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc27
1 files changed, 18 insertions, 9 deletions
diff --git a/.zshrc b/.zshrc
index 5bb0a87..b94803b 100644
--- a/.zshrc
+++ b/.zshrc
@@ -12,11 +12,20 @@ unsetopt autocd beep
bindkey -e
# End of lines configured by zsh-newuser-install
+# Source cfgopts before anything else
+source "$HOME/.cfgopts"
+
# Aliases from .zsh-aliases for convenience
-source ~/.zsh_aliases
+source "$HOME/.zsh_aliases"
+
+# Make sure ssh-agent is running and accessible, if required
+if [ $ZOPT_SSH_AGENT_EN -eq 1 ]; then
+ source "$HOME/.zsh/ssh-agent-setup.sh"
+fi
-# Make sure ssh-agent is running and accessible
-source ~/.zsh/ssh-agent-setup.sh
+# Git information in the prompt, if required
+setopt prompt_subst
+source "$HOME/.zsh/git-prompt.sh"
# Stupid keys don't work by default
#bindkey "^[[2~" # Insert
@@ -26,14 +35,11 @@ bindkey "^[[5~" up-history # Page up
bindkey "^[[6~" down-history # Page down
bindkey "^[[F" end-of-line # End
-# Git prompt function
-setopt prompt_subst
-source ~/.zsh/git-prompt.sh
-
# Custom prompt, should look like this:
-# user@hostname ~/working/directory git_branch_if_any $
+# [hh:mm:ss] user@host ~
+# $
NEWLINE=$'\n'
-export PROMPT="%B%F{green}[%*]%f%b %n@%m %4~%B%F{green}\$(__git_ps1 "%s")%f%b${NEWLINE}%B%(!.#.$)%b "
+export PROMPT="%B%F{$ZOPT_PROMPT_COLOUR}[%*]%f%b %n@%m %4~%B%F{green}\$(__git_ps1 "%s")%f%b${NEWLINE}%B%(!.#.$)%b "
# Coloured man pages
man() {
@@ -46,3 +52,6 @@ man() {
LESS_TERMCAP_us=$'\E[04;38;5;146m' \
man "$@"
}
+
+#export PATH="$PATH:$HOME/bin"
+