diff --git a/.config/shell/rc.d/fuzzy-finding.sh b/.config/shell/rc.d/fuzzy-finding.sh index 1b8bc2b..447d4c0 100644 --- a/.config/shell/rc.d/fuzzy-finding.sh +++ b/.config/shell/rc.d/fuzzy-finding.sh @@ -1,5 +1,14 @@ #!/bin/sh +sk-with-binds() { +sk --ansi --color=dark --border \ + --preview-window=":hidden" \ + --preview='head -$LINES {}' \ + --bind='ctrl-y:execute-silent(echo {} | xclip -selection "clipboard"),ctrl-x:toggle-preview' \ + --header='[ctrl-y]:yank current item [ctrl-x]:toggle preview window' \ + "$@" +} + # check for existence of fuzzy finders. If found, substitute fzf with it. # order is skim > fzy > fzf > nothing if type sk >/dev/null 2>&1; then