4 ms·
> could I achieve that with fzf? I've been sporting this alias for a while now: alias pf="fzf --preview='less {}' --bind shift-up:preview-page-up,shift-do
by nickjj 4y ago
> could I achieve that with fzf?
I've been sporting this alias for a while now:
alias pf="fzf --preview='less {}' --bind shift-up:preview-page-up,shift-down:preview-page-down"
You can run `pf` (preview file) in a directory and it opens a split window with fzf where you can preview text files with less and optionally filter down which files are matched with fzf.
fzf is great.
- lloeki 4y agoN'other silly one: git log --oneline --decorate --color | fzf --ansi --preview 'git show $(echo {} | cut -d" " -f1)' The possibilities, they are _endless_ !!11!1!
- nickjj 4y agoIndeed! If you're using the fzf.vim plugin[0] you can run `:Commits` to do something similar to your command too. It adds a bit more detail such as when the commit was made in relative format and color codes the git diff. [0]: https://github.com/junegunn/fzf.vim https://github.com/junegunn/fzf.vim