dotfiles/zsh/zshrc
Fernando Schauenburg 257f62d3df zsh: roll my own prompt
Spaceship was cool but I didn't care for all the bold fonts and it was
quite slow under WSL. So I made my own lightning fast prompt just the
way I want, drawing inspiration and ideas from:

* https://github.com/spaceship-prompt/spaceship-prompt
* https://github.com/laggardkernel/spacezsh-prompt
* https://github.com/sindresorhus/pure
* https://github.com/therealklanni/purity
* https://github.com/magicmonty/bash-git-prompt
2021-08-13 22:07:09 +02:00

40 lines
1 KiB
Bash

#!/bin/zsh
# Set up zsh for interactive use (options, prompt, aliases, etc.)
# Source additional configurations if available.
while read -r f; do [ -f "$f" ] && source "$f"; done <<EOL
$ZDOTDIR/aliases
$ZDOTDIR/prompt
$ZDOTDIR/vi-mode
EOL
unset f
# Prevent ctrl-s from freezing the terminal.
stty stop undef
# Save a lot of history.
HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/history"
HISTSIZE=1000000
SAVEHIST=1000000
#autoload -U compinit
zstyle ':completion:*' menu select
#autoload -U compinit && compinit
# bindkey -M menuselect 'h' vi-backward-char
# bindkey -M menuselect 'k' vi-up-line-or-history
# bindkey -M menuselect 'l' vi-forward-char
# bindkey -M menuselect 'j' vi-down-line-or-history
# Search through history in insert mode.
bindkey -M viins '^j' history-beginning-search-forward
bindkey -M viins '^k' history-beginning-search-backward
# Restore some common and useful emacs mode shortcut.
bindkey -M viins '^a' vi-beginning-of-line
bindkey -M viins '^e' vi-end-of-line
bindkey -M viins '^l' clear-screen