Some new features

This commit is contained in:
Alexander Gehrke 2014-06-27 07:45:18 +02:00
parent fd463e0d24
commit 42cffd35cc
9 changed files with 588 additions and 2 deletions

4
modules/fasd/init Normal file
View file

@ -0,0 +1,4 @@
eval "$(fasd --init auto)"
bindkey '^X^A' fasd-complete # C-x C-a to do fasd-complete (fils and directories)
bindkey '^X^F' fasd-complete-f # C-x C-f to do fasd-complete-f (only files)
bindkey '^X^D' fasd-complete-d # C-x C-d to do fasd-complete-d (only directories)

14
modules/percol/init Executable file
View file

@ -0,0 +1,14 @@
#!/bin/zsh
if exists percol; then
function percol_select_history() {
local tac
exists gtac && tac="gtac" || { exists tac && tac="tac" || { tac="tail -r" } }
BUFFER=$(fc -l -n 1 | eval $tac | percol --query "$LBUFFER")
CURSOR=$#BUFFER # move cursor
zle -R -c # refresh
}
zle -N percol_select_history
bindkey '^R' percol_select_history
fi

View file

@ -1,5 +1,5 @@
#!/bin/zsh
if [ -e $HOME/.wtf ] && which wtf &>/dev/null; then
if [ -e $HOME/.wtf ] && exists wtf; then
if [ -n "$WTF_WORK_END" ]; then
export WTF_REST=$(wtf raw -d $WTF_WORK_END diff);
else