You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "git files" preview command uses {-1} which creates an issue if the filename has space characters in it. e.g. if filename is "two words" then {-1} will return words"
I tried fixing this by 1. using {2..} which skips the git status flag and 2. piping the output of "git ls-files" to sed 's/"\(.*\)"$/\1/' in order to remove the double-quotes from filenames. For example if git status is M "two words" then the sed command will give M two words and then {2..} should give two words. Then the preview command should work because it adds its own single quote.
Other options I looked at is git ls-files -z but I don't know how to send that to fzf
The text was updated successfully, but these errors were encountered:
The "git files" preview command uses
{-1}
which creates an issue if the filename has space characters in it. e.g. if filename is "two words" then{-1}
will returnwords"
I tried fixing this by 1. using
{2..}
which skips the git status flag and 2. piping the output of "git ls-files" tosed 's/"\(.*\)"$/\1/'
in order to remove the double-quotes from filenames. For example if git status isM "two words"
then the sed command will giveM two words
and then{2..}
should givetwo words
. Then the preview command should work because it adds its own single quote.Other options I looked at is
git ls-files -z
but I don't know how to send that to fzfThe text was updated successfully, but these errors were encountered: