Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option --path-separator does not work on pattern with --full-path #607

Closed
claudetete opened this issue May 27, 2020 · 4 comments
Closed

Comments

@claudetete
Copy link

claudetete commented May 27, 2020

Describe the bug you encountered:
On MS Windows, so with backslash as path separator but using git bash, with following directory tree:

./folder/
./folder/foo
./anotherfolder/
./anotherfolder/folder/
./anotherfolder/folder/bar
$ fd --path-separator="//" --full-path --type f '.*/folder/.*'

does not return any results

$ fd --path-separator="//" --full-path --type f '.*\\folder\\.*'
anotherfolder/folder/bar
folder/foo

Describe what you expected to happen:
--path-separator should operate on pattern when using with --full-path

What version of fd are you using?

fd 8.1.1

Which operating system / distribution are you on?
Windows: Windows Server 2008 or Windows 10 (with git bash but also tested with cmd)

Since #429, which is a relief to use fd on MS Windows with git bash, thanks a lot !

@claudetete claudetete added the bug label May 27, 2020
@sharkdp
Copy link
Owner

sharkdp commented May 27, 2020

Thank you for reporting this.

I haven't looked into the details, but could this be related to #537? probably not.

@reima
Copy link
Contributor

reima commented Oct 3, 2020

I don't think this is specific to Windows only. --path-separator currently only replaces the separator when printing file paths, not when matching.

@sharkdp Should the --path-separator also be applied when matching? As it is currently documented, it should only affect the output: "Set the path separator to use when printing file paths." [emphasis mine]

@sharkdp
Copy link
Owner

sharkdp commented Oct 8, 2020

@reima Yes, I agree. It's not really a bug so far. The question would be if it would be good for Windows users (and more intuitive?) to support this for matching as well.

@sharkdp sharkdp removed the bug label Oct 25, 2020
@sharkdp
Copy link
Owner

sharkdp commented Oct 25, 2020

Closing this for now. Not clear if anything should be changed.

@sharkdp sharkdp closed this as completed Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants