dotfiles-zsh/.zshrc

76 lines
2 KiB
Bash
Raw Permalink Normal View History

2015-09-19 22:49:04 +02:00
# The following lines were added by compinstall
zstyle ':completion:*' completer _complete _ignored
2016-01-04 22:18:20 +01:00
zstyle :compinstall filename '~/.zshrc'
2015-09-19 22:49:04 +02:00
2016-02-29 21:28:55 +01:00
# Completion
2015-09-19 22:49:04 +02:00
autoload -Uz compinit
compinit
2018-05-08 13:33:04 +02:00
HISTFILE=~/.zsh_history
HISTSIZE=5000000
SAVEHIST=5000000
setopt incappendhistory sharehistory beep nomatch notify autocd histignoredups correct autopushd pushdsilent pushdtohome pushdignoredups pushdminus
2015-09-19 22:49:04 +02:00
2016-02-29 21:28:55 +01:00
# emacs keybindings
2015-09-19 22:49:04 +02:00
bindkey -e
# do not put commands prefixed with space into history
setopt hist_ignore_space
2016-02-29 21:28:55 +01:00
# Prevent need to reset terminal
ttyctl -f
2015-09-19 22:49:04 +02:00
# Arrows in the Completition menu
zstyle ':completion:*' menu select
# colors
autoload -U colors && colors
# Load with prompt
autoload -U promptinit
promptinit
2018-06-03 00:25:40 +02:00
PROMPT="%{$fg_no_bold[blue]%}%n%{$reset_color%}%{$fg_no_bold[red]%}%#%{$reset_color%}%{$fg_no_bold[blue]%}%m%{$reset_color%}%{$fg_no_bold[green]%}%~:%{$fg_no_bold[yellow]%}%?%{$fg_no_bold[green]%}$ %{$reset_color%}"
2015-11-26 17:34:23 +01:00
RPROMPT="%{$fg_no_bold[green]%}%~%{$reset_color%} [%{$fg_no_bold[yellow]%}%*%{$reset_color%}]"
2015-09-19 22:49:04 +02:00
2016-02-23 22:53:18 +01:00
# Bashish navigation
autoload -U select-word-style
select-word-style bash
2015-09-19 22:49:04 +02:00
# Show cwd in titlebar
precmd() {
tab_label=${PWD/${HOME}/\~}
2016-11-07 14:30:01 +01:00
echo -ne "\e]2;${HOST}:${tab_label}\a"
2015-09-19 22:49:04 +02:00
}
# source banner
. ~/.banner
2018-05-08 13:33:04 +02:00
# Report CPU usage for commands running longer than 1 second
REPORTTIME=1
# # Report Memory usage for commands running longer than 1 second
# REPORTMEMORY=1
# Format reports
TIMEFMT="%J %U user %S system %P cpu %*E total, %X kB text space %D kB data/stack memory %M kB max. %K kB total, %O iops %I oops, %w waits %c ctx switches"
2016-02-29 21:28:55 +01:00
# Dirstack
DIRSTACKSIZE=20
2018-05-30 10:29:57 +02:00
2020-01-13 22:15:19 +01:00
# configure gpg agent
GPG_TTY=$(tty)
export GPG_TTY
# source fzf
if [ -e "/usr/share/doc/fzf/examples/key-bindings.zsh" ] ; then
. /usr/share/doc/fzf/examples/key-bindings.zsh
elif [ -e "/usr/share/fzf/key-bindings.zsh" ] ; then
. /usr/share/fzf/key-bindings.zsh
fi
# source virtualenvwrapper
if [ -e "/usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh" ] ; then
. /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
fi