vim --recycle --add-fuzzy-matching; bash --add-fuzzy-matching

This commit is contained in:
Geoffrey Frogeye 2018-06-24 18:27:20 +02:00
parent 57f9edbf56
commit 81a0bc59c5
4 changed files with 107 additions and 99 deletions

11
bashrc
View file

@ -42,8 +42,6 @@ alias dd='dd status=progress'
alias rm='rm -Iv --one-file-system'
alias free='free -m'
alias df='df -h'
alias pacman='pacman --color auto'
alias pacaur='pacaur --color auto'
alias dmesg='dmesg --ctime'
# Frequent mistakes
@ -105,7 +103,7 @@ shopt -s hostcomplete
export HISTSIZE=100000
export HISTFILESIZE=${HISTSIZE}
export HISTCONTROL=ignorespace:erasedups
export HISTTIMEFORMAT="%d/%m/%y %H:%M:%S "
export HISTTIMEFORMAT="%y-%m-%d %H:%M:%S "
# PROMPT CUSTOMIZATION
@ -132,6 +130,13 @@ export PATH="$HOME/.bin/:$HOME/.scripts/:$PATH"
# Bash completion
[ -f /etc/bash_completion ] && . /etc/bash_completion
# Fuzzy matching all the way
export FZF_DEFAULT_OPTS="--height 100% --layout=default"
export FZF_CTRL_T_OPTS="--preview '[[ -d {} ]] && ls -l --color=always {} || [[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (highlight -O ansi -l {} || coderay {} || rougify {} || cat {}) 2> /dev/null | head -500'"
export FZF_COMPLETION_OPTS="${FZF_CTRL_T_OPTS}"
[ -f /usr/share/fzf/completion.bash ] && source /usr/share/fzf/completion.bash
[ -f /usr/share/fzf/key-bindings.bash ] && source /usr/share/fzf/key-bindings.bash
# Bad day mood-saver
function fuck {
if which thefuck &> /dev/null