]>
Commit | Line | Data |
---|---|---|
1b8a4102 | 1 | # modules |
2 | autoload -Uz vcs_info | |
3 | zstyle ':vcs_info:*' enable git | |
4 | zstyle ':vcs_info:*' get-revision true | |
5 | zstyle ':vcs_info:git*' formats "(%F{green}%r/%b%f) %m%u%c " | |
6 | precmd() { vcs_info } | |
7 | ||
8 | # prompt | |
9 | setopt prompt_subst | |
10 | PROMPT='%F{$VICOL}%n%f@%F{$VICOL}%m%f%(?../%F{red}$?%f)%# ' | |
11 | RPROMPT='${vcs_info_msg_0_}%F{yellow}%~%f %T' | |
12 | ||
13 | function zle-line-init zle-keymap-select { | |
14 | VICOL="${${KEYMAP/vicmd/red}/(main|viins)/green}" | |
15 | zle reset-prompt | |
16 | } | |
17 | zle -N zle-line-init | |
18 | zle -N zle-keymap-select | |
19 | ||
20 | # common aliases | |
21 | alias h="history -25" | |
22 | alias j="jobs -l" | |
23 | alias la="ls -aF" | |
24 | alias lf="ls -AF" | |
25 | alias ll="ls -lhAF" | |
26 | alias pa="sudo ps -Sudax" | |
27 | ||
28 | # be paranoid | |
29 | alias cp='cp -ip' | |
30 | alias mv='mv -i' | |
31 | alias rm='rm -I' | |
32 | ||
33 | # venv | |
34 | alias activate="source bin/activate" | |
35 | ||
36 | # ports | |
37 | alias pkg-install-make-build-depends="sudo pkg install --automatic \`make build-depends-list | sed 's/\/usr\/ports\// /' | tr -d '\n'\`" | |
38 | alias pkg-install-make-run-depends="sudo pkg install --automatic \`make run-depends-list | sed 's/\/usr\/ports\// /' | tr -d '\n'\`" | |
39 | ||
40 | # keys | |
41 | bindkey "^[[7~" beginning-of-line #Home | |
42 | bindkey "^[[8~" end-of-line #End | |
43 | bindkey "^[[3~" delete-char #Del | |
44 | # vt keys | |
45 | bindkey "^[[H" beginning-of-line #Home | |
46 | bindkey "^[[F" end-of-line #End | |
47 | ||
48 | autoload -Uz up-line-or-beginning-search down-line-or-beginning-search | |
49 | zle -N up-line-or-beginning-search | |
50 | zle -N down-line-or-beginning-search | |
51 | [[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search | |
52 | [[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search | |
53 | ||
54 | # The following lines were added by compinstall | |
55 | zstyle ':completion:*' auto-description 'specify: %d' | |
56 | zstyle ':completion:*' expand suffix | |
57 | zstyle ':completion:*' format '# %d' | |
58 | zstyle ':completion:*' group-name '' | |
59 | zstyle ':completion:*' ignore-parents parent | |
60 | zstyle ':completion:*' insert-unambiguous false | |
61 | zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} | |
62 | zstyle ':completion:*' list-prompt '%B%i%b' | |
63 | zstyle ':completion:*' list-suffixes true | |
64 | zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._-]=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' | |
65 | zstyle ':completion:*' menu select=1 | |
66 | zstyle ':completion:*' original false | |
67 | zstyle ':completion:*' select-prompt '%B%l%b' | |
68 | zstyle ':completion:*' verbose true | |
69 | zstyle :compinstall filename '/home/ds6/.zshrc' | |
70 | ||
71 | autoload -Uz compinit | |
72 | compinit | |
73 | # End of lines added by compinstall | |
74 | ||
75 | # Lines configured by zsh-newuser-install | |
76 | HISTFILE=~/.histfile | |
77 | HISTSIZE=100 | |
78 | SAVEHIST=100 | |
79 | setopt appendhistory autocd extendedglob | |
80 | unsetopt beep | |
81 | bindkey -v | |
82 | # End of lines configured by zsh-newuser-install | |
83 | ||
84 | # vim: ts=8:sts=4:sw=4:et:tw=80 |