Add zsh config

master
Dario Ernst 5 years ago committed by Dario Ernst
parent 45ed82a058
commit 7ab61312d5

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,44 @@
# fuzzy finder
source /usr/share/doc/fzf/examples/key-bindings.zsh
bindkey '^H' fzf-cd-widget
time source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
alias preview="fzf --preview 'bat --color \"always\" {}'"
alias rg="rg -S -p"
alias ldict="dict.cc.py en de"
alias cat='batcat'
alias unp='dtrx'
ppvagrant() {
pushd -q ~/source/ilabs/platform-prov/vagrant
export VAGRANT_INET=1
export VAGRANT_SYNC_HOST='/home/dario/source/ilabs/'
export VAGRANT_SYNC_GUEST='/src'
export VAGRANT_SYNC_EXCLUDE='.git|venv|node_modules|.app.tar'
export VB_NO_UI=1
command vagrant $*
popd -q
}
rga-fzf() {
RG_PREFIX="rga --files-with-matches"
local file
file="$(
FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \
fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \
--phony -q "$1" \
--bind "change:reload:$RG_PREFIX {q}" \
--preview-window="70%:wrap"
)" &&
echo "opening $file" &&
xdg-open "$file"
}
export PYENV_ROOT="$HOME/source/pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export PATH=/usr/lib/cargo/bin/:$PATH:/home/dario/.local/bin/

@ -0,0 +1,15 @@
HISTSIZE=10000000
SAVEHIST=10000000
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
GRML_NO_APT_ALIASES=1
Loading…
Cancel
Save