blob: 935339ce647631068303f284ad8349ef25738b93 (
plain) (
blame)
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
|
autoload -Uz compinit
autoload colors ; colors
autoload -U edit-command-line
compinit
HISTFILE=~/.histfile
HISTSIZE=900000
SAVEHIST=200000
setopt appendhistory nomatch
unsetopt autocd beep extendedglob notify
# set line editing to vim
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
PS1="$(print '%{\e[1;30m%}[%{\e[1;31m%}%*%{\e[1;30m%}]%{\e[0m%} %{\e[1;30m%}[%{\e[1;31m%}%n%{\e[1;30m%}-%{\e[1;31m%}%m%{\e[1;30m%}]%{\e[1;31m%} %2d %{\e[0m%}')"
bindkey -v '^[[3~' delete-char
bindkey -v '^[[4~' end-of-line
bindkey -v '^[OF' end-of-line
bindkey -v '^[[F' end-of-line
bindkey -v '^[[1~' beginning-of-line
bindkey -v '^[[H' beginning-of-line
bindkey -v '^[OH' beginning-of-line
bindkey -v '^[[5~' history-beginning-search-backward
bindkey -v '^[[6~' history-beginning-search-forward
bindkey -v '^K' history-search-backward
bindkey -v '^J' history-search-forward
bindkey -v '^R' history-incremental-search-backward
bindkey -v '^T' history-incremental-search-forward
bindkey -v '^[^?' backward-delete-word
# environment setup
export EDITOR="vim"
export PAGER="less -FXR"
# load any SSH keys into the agent
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent/agent.sock"
keys_loaded="$( ssh-add -l | grep 'has no ident' | wc -l )"
if [ "$keys_loaded" -eq "1" ]; then
ssh-add
fi
ssh-add -l
|