mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-24 20:16:31 +00:00
10 lines
304 B
Fish
10 lines
304 B
Fish
# A function that can be used as the preview function for FZF to make fancy previews with syntax highlighting
|
|
function __fzf_preview
|
|
if file --mime "$argv" | grep -q binary
|
|
echo "$argv is a binary file"
|
|
else
|
|
coderay "$argv" ;or cat "$argv" 2> /dev/null | head -250
|
|
end
|
|
end
|
|
|