diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2018-04-14 20:49:06 +0200 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2018-04-14 20:49:06 +0200 |
commit | 366002c3e6c0263d287c7eb9030f648b7a2b3cbf (patch) | |
tree | 8d2d68dfcb5619e8aa07271eb4482d37b1747807 /.zshrc |
Initial commit
Diffstat (limited to '.zshrc')
-rw-r--r-- | .zshrc | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -0,0 +1,48 @@ +# The following lines were added by compinstall +zstyle :compinstall filename '/home/eddy/.zshrc' +autoload -Uz compinit +compinit +# End of lines added by compinstall + +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +unsetopt autocd beep +bindkey -e +# End of lines configured by zsh-newuser-install + +# Aliases from .zsh-aliases for convenience +source ~/.zsh_aliases + +# Make sure ssh-agent is running and accessible +source ~/.zsh/ssh-agent-setup.sh + +# Stupid keys don't work by default +#bindkey "^[[2~" # Insert +bindkey "^[[3~" delete-char # Delete +bindkey "^[[H" beginning-of-line # Home +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 $ +NEWLINE=$'\n' +export PROMPT="%B%F{green}[%*]%f%b %n@%m %4~%B%F{green}\$(__git_ps1 "%s")%f%b${NEWLINE}%B%(!.#.$)%b " + +# Coloured man pages +man() { + env LESS_TERMCAP_mb=$'\E[01;31m' \ + LESS_TERMCAP_md=$'\E[01;38;5;74m' \ + LESS_TERMCAP_me=$'\E[0m' \ + LESS_TERMCAP_se=$'\E[0m' \ + LESS_TERMCAP_so=$'\E[38;5;246m' \ + LESS_TERMCAP_ue=$'\E[0m' \ + LESS_TERMCAP_us=$'\E[04;38;5;146m' \ + man "$@" +} |