Commit Graph

20 Commits

Author SHA1 Message Date
Tavian Barnes 1031325cca filesystem: Remove a redundant as_str() 2024-04-28 17:30:44 -04:00
Jian Wang f875ea9a52 Set default path separator to '/' in MSYS/MSYS2
The environments of MSYS: [[https://www.msys2.org/docs/environments/]]
2024-03-13 19:32:13 +01:00
Christian Göttsche 36bc84041b Support character and block device file types 2023-10-21 13:56:33 +02:00
Ptipiak 88bebb8aac Using faccess lib to detect executable files
* The detection of executable files was not exactly the same as
the original find
2022-11-15 10:31:44 +01:00
Tavian Barnes cbc6ddeefc Implement --type executable on Windows
Fixes #1051.
2022-09-11 20:46:19 +02:00
Jonathan Goren 3dc61b5f28 rename module entry -> dir_entry 2021-12-11 15:43:52 +02:00
Jonathan Goren 813a802b2c send DirEntries to output instead of just path 2021-12-11 15:42:07 +02:00
David Peter 2d398dc4a7 Fix directory-existence check on Windows
This fixes a bug on Windows where `fd` could not be used on ram disks
and encrypted folders.

closes #752
2021-08-08 15:02:01 +02:00
David Peter 2a2126c40a Fix clippy warnings 2021-07-27 09:05:23 +02:00
Allen Wild 1a3615df9c set default path separator to '/' in MSYS
MSYS and MSYS2 environments (such as Git Bash) have a UNIX like
filesystem which uses '/' as the path separator rather than '\', but
Rust doesn't know about this by default.

On Windows, check the MSYSTEM environment variable and set the default
value of the --path-separator option to '/' for convenience.

There is no similar detection of Cygwin because there seems to be no way
for Rust (and any native Win32) programs to detect that they're being
called from a Cygwin environment. Cygwin users can use a shell
alias/function/script to wrap fd.

Fixes: https://github.com/sharkdp/fd/issues/537
2021-02-15 20:08:59 +01:00
sharkdp 0335cc362b Do not allow list-details in combination with -1 2020-04-16 10:11:05 +02:00
sharkdp cb56add1d8 Add new `--type socket` and `--type pipe` filters
closes #511
2020-04-16 09:59:45 +02:00
sharkdp 6c9e743d43 Print path as raw bytes, allowing invalid UTF-8 filenames to be passed to other processes 2020-04-04 18:46:08 +02:00
sharkdp ed45d1c5af Remove duplicate 'strip prefix' function 2020-04-04 18:46:08 +02:00
sharkdp e44f2f8540 Rewrite replace_path_separator function 2020-04-03 23:01:57 +02:00
sharkdp 2ea77e7cdc Add TODOs, move function 2020-04-03 22:51:41 +02:00
sharkdp 33eb857a81 Cleanup 2020-04-03 22:36:32 +02:00
sharkdp 6e96154d86 Add tests for strip_current_dir 2020-04-03 22:36:32 +02:00
sharkdp 556c40e1f4 Move strip_current_dir 2020-04-03 22:36:32 +02:00
sharkdp b415d7234b Rename fshelper to filesystem 2020-04-03 22:36:32 +02:00