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