Skip to content

Commit

Permalink
fix: use posix shell with fzf
Browse files Browse the repository at this point in the history
  • Loading branch information
basbebe committed Nov 12, 2021
1 parent eb9aaf1 commit cf893bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/kcr/commands/fzf/kcr-fzf-grep
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ for path do
echo "$path" >> "$PATHS_PATH"
done

fzf --phony --delimiter ':' --ansi --bind 'change:reload(while read path; do set -- "$@" "$path"; done < "$PATHS_PATH"; rg --color=always --column --with-filename --fixed-strings -- {q} "$@" || true),enter:execute(kcr edit {1} +{2}:{3})+abort' --preview 'highlight_line={2} line_range_begin=$((line = highlight_line - (FZF_PREVIEW_LINES / 4) && line < 1 ? 1 : line)) line_range_end=$((line_range_begin + FZF_PREVIEW_LINES)) && bat --style=numbers --color=always --line-range "$line_range_begin:$line_range_end" --highlight-line {2} {1} 2> /dev/null' --header='Select a file to open' --prompt='(g)>'
SHELL=sh fzf --phony --delimiter ':' --ansi --bind 'change:reload(while read path; do set -- "$@" "$path"; done < "$PATHS_PATH"; rg --color=always --column --with-filename --fixed-strings -- {q} "$@" || true),enter:execute(kcr edit {1} +{2}:{3})+abort' --preview 'highlight_line={2} line_range_begin=$((line = highlight_line - (FZF_PREVIEW_LINES / 4) && line < 1 ? 1 : line)) line_range_end=$((line_range_begin + FZF_PREVIEW_LINES)) && bat --style=numbers --color=always --line-range "$line_range_begin:$line_range_end" --highlight-line {2} {1} 2> /dev/null' --header='Select a file to open' --prompt='(g)>'

0 comments on commit cf893bd

Please sign in to comment.