From a442de0292065e55850b14df39698ac0dee7672f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 17 Jun 2019 23:13:55 +0200 Subject: [PATCH] Begin adding custom sk command --- .config/shell/rc.d/fuzzy-finding.sh | 9 +++++++++ 1 file changed, 9 insertions(+) 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