Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
[Search history] preview command using bat (PatrickF1#134)
Browse files Browse the repository at this point in the history
This gives the command fish syntax highlighting.
  • Loading branch information
kidonng authored and hrshtst committed Mar 19, 2021
1 parent 1af2fe6 commit 3a64227
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 3a64227

Please sign in to comment.