]> git.sev.monster Git - dotfiles.git/blame - base/.zshrc
added ssh display to zsh title, made VICOL strict
[dotfiles.git] / base / .zshrc
CommitLineData
1b8a4102 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 "
03bc64c4 6
7function precmd {
7cdf1f1b 8 print -Pn "\e]0;${SSH_CLIENT+$USER@$HOST}%#zsh%(1j,:%j,):%~\a"
03bc64c4 9 vcs_info
03bc64c4 10}
11function preexec {
12 printf "\033]0;%s\a" "$1"
13}
1b8a4102 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 {
7cdf1f1b 21 VICOL="${${KEYMAP:/vicmd/red}:/(main|viins)/green}"
1b8a4102 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"
03bc64c4 34function s { sysctl hw.snd.default_unit=$1 }
1b8a4102 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
03bc64c4 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'\`"
1b8a4102 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
03bc64c4 92# vim: ts=8:sts=4:sw=4:et:tw=79
This page took 0.052156 seconds and 4 git commands to generate.