Skip to content

Instantly share code, notes, and snippets.

@magJ
Created July 3, 2018 05:50
Show Gist options
  • Save magJ/5b7f12a808621113410d2c23850f552c to your computer and use it in GitHub Desktop.
Save magJ/5b7f12a808621113410d2c23850f552c to your computer and use it in GitHub Desktop.
Config options for inteligent preview using fzf on fish shell.
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