junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
65.39k stars 2.4k forks source link

[Feature request] shorten_path option #2969

Closed boydkelly closed 2 years ago

boydkelly commented 2 years ago

In notational velocity fzf, (and Telescope), the file/directory listing shows (can show) only the first letter of a directory and the full filename. Checking in velocity-fzf.vim points to a python script used for this(attached). However I would love to see this available on the command line. In my usage what is most important is the file name and preview as big as possible. The actual path is not essential. Is it possible to make this an option directly in fzf? Thanks for this most awesome utility!

shorten_path (notational velocity)

junegunn commented 2 years ago

fzf follows the Unix philosophy and it does not implement input/output transformation that can be done by other programs.

I would love to see this available on the command line

You might want to take the code from the plugin and turn it into a standalone executable binary so you can use it with other programs like fzf.

# nl transforms the input
# fzf is just a filter
ls -al | nl | fzf --with-nth 2.. | awk '{print $1}'