[Windows] : [bat error]: The filename, directory name, or volume label syntax is incorrect. (os error 123)
What steps will reproduce the bug?
- I tried to run
rg --line-number --with-filename . --color=always --field-match-separator ' ' | fzf --preview "bat --color=always {}" - In preview window I got
[bat error]: 'filename': The filename, directory name, or volume label syntax is incorrect. (os error 123) - Individually all tools viz. bat, fzf, rg work as expected.
What did you expect to happen instead?
I expected the command to show preview of the file where the searched sting is found.
How did you install bat?
Scoop
bat version and environment
bat 0.23.0 (Windows)
Is this issue fixed? I also have trouble with it when previewing by bat with fzf and ripgrep
rg --line-number . | fzf --preview 'bat --theme=OneHalfDark --color=always --style=numbers --line-range=:500 {}'
And I have this issue only when using combine with ripgrep When I only ran fzf part, previewing by bat worked great
fzf --preview 'bat --theme=OneHalfDark --color=always --style=numbers --line-range=:500 {}'
Wonder if I pipe with ripgrep the wrong way... If this isn't a bug, just have an issue when pipe with ripgrep, please help me correct it, I just tried to use it with ripgrep recently... At first, I want to use the above command to list all files that have the specific content
My OS: Windows Package manager used to install: Chocolatey Version:
bat 0.24.0 (fc95468)
ripgrep 13.0.0 (rev af6b6c543b)
fzf 0.43.0 (d3311d9)
Thanks for reading
I tested in ubuntu (windows subsystem for linux) and got this issue too
rg --line-number . | fzf --preview 'batcat --theme=OneHalfDark --color=always --style=numbers --line-range=:500 {}'