From 66eac40675f320d859291fac6b4944a095c8d7d2 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 15 Apr 2018 13:31:31 +0200 Subject: Renamed .zprofile to .zlogin for compatibility with the options file, added options file and support for it in .zshrc --- .zshrc | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to '.zshrc') 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" + -- cgit v1.2.3