blob: 39e5d8650872d4c573bdb9a93725b1598c4b4353 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# 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
# Source cfgopts before anything else
source "$HOME/.cfgopts"
# Aliases from .zsh-aliases for convenience
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
# 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
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
# Custom prompt, should look like this:
# [hh:mm:ss] user@host ~
# $
NEWLINE=$'\n'
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() {
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 "$@"
}
|