]> git.friedersdorff.com Git - max/saltfiles.git/blob - states/zsh/files/zshrc
77dec342c97500439993cd3b700629962bed507b
[max/saltfiles.git] / states / zsh / files / zshrc
1 # The following lines were added by compinstall
2
3 zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
4 zstyle ':completion:*' completions 1
5 zstyle ':completion:*' expand suffix
6 zstyle ':completion:*' glob 1
7 zstyle ':completion:*' ignore-parents parent pwd
8 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
9 zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
10 zstyle ':completion:*' list-suffixes true
11 zstyle ':completion:*' max-errors 1
12 zstyle ':completion:*' menu select=1
13 zstyle ':completion:*' preserve-prefix '//[^/]##/'
14 zstyle ':completion:*' prompt 'Corrections with %e differences:'
15 zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
16 zstyle ':completion:*' substitute 1
17 zstyle :compinstall filename '/home/max/.zshrc'
18
19 autoload -Uz compinit
20 compinit
21 # End of lines added by compinstall
22 # Lines configured by zsh-newuser-install
23 HISTFILE=~/.histfile
24 HISTSIZE=100000
25 SAVEHIST=100000
26 setopt appendhistory autocd extendedglob nomatch
27 unsetopt beep notify
28 bindkey -v
29 # End of lines configured by zsh-newuser-install
30
31 # Prompt
32 NEWLINE=$'\n'
33 setopt prompt_subst
34
35 p="%(?;%F{green};%F{red})[%h]%f "
36 p+="%F{red}%B%n%b%f@%F{red}%B%m%b%f"
37 p+=":%F{blue}%~%f"
38 p+="${NEWLINE}%(!.#.$) "
39
40 source ~/.git-prompt.sh
41 precmd () {
42         __git_ps1 "" "${p}" "${NEWLINE}[%s]${NEWLINE}"
43 }
44
45 if ! pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1; then
46   gpg-connect-agent /bye >/dev/null 2>&1
47 fi
48
49 unset SSH_AGENT_PID
50 if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
51   export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
52 fi
53
54
55 gpg-connect-agent updatestartuptty /bye > /dev/null
56
57 bindkey '^R' history-incremental-search-backward
58
59 if [[ -f ~/.shell_aliases ]]; then
60         source ~/.shell_aliases
61 fi