Skip to content

Commit

Permalink
[Search history] preview command using bat (#134)
Browse files Browse the repository at this point in the history
This gives the command fish syntax highlighting.
  • Loading branch information
kidonng authored Mar 9, 2021
1 parent 58c4c49 commit d7e66d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/__fzf_search_history.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function __fzf_search_history --description "Search command history. Replace the
builtin history --null --show-time="%m-%d %H:%M:%S | " |
fzf --read0 --tiebreak=index --query=(commandline) \
# preview current command in a window at the bottom 3 lines tall
--preview="echo {4..}" \
--preview="echo -- {4..} | bat --plain --color=always --language=fish" \
--preview-window="bottom:3:wrap" |
string collect
)
Expand Down

0 comments on commit d7e66d3

Please sign in to comment.