Created
July 3, 2018 05:50
-
-
Save magJ/5b7f12a808621113410d2c23850f552c to your computer and use it in GitHub Desktop.
Config options for inteligent preview using fzf on fish shell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -x FZF_CTRL_T_OPTS '--preview \'switch (file --mime {}) | |
case "*inode/directory*" | |
ls -l {} | |
case "*binary*" | |
echo {} "is a binary file" | |
file {} | |
case "*" | |
highlight -O ansi -l {}; or cat {}| head -500 | |
end\'' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment