diff options
author | Ben Sima <ben@bsima.me> | 2021-05-22 16:25:04 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-05-22 16:25:04 -0400 |
commit | 4685c6bd5a7afc598b1f130835253af42d496cfc (patch) | |
tree | 38f5e6798a0f5d79611402a73bb8132096533f54 /seek | |
parent | 57b6271251f343b49351883090a3b1955ba0ddae (diff) |
add seek command
Diffstat (limited to 'seek')
-rwxr-xr-x | seek | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +#!/usr/bin/env bash +RG_DEFAULT_COMMAND="rg --ignore-case --files-with-matches" +FZF_DEFAULT_COMMAND="rg --files" +selected=$(fzf \ + --multi \ + --exact \ + --ansi \ + --phony \ + --bind "ctrl-a:select-all" \ + --bind "change:reload:$RG_DEFAULT_COMMAND {q} || true" \ + --print-query \ + --preview "rg --ignore-case --pretty --context 2 {q} {}" +) +# returns 'query [files]' +edit +/$selected |