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