Skip to content
Myr

Merge pull request #1464 from Ato2207/dir_alias

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Added alias --type dir

authored by Thayne McCombs · committed by GitHub · parents 58284b8, 3cb6b9d · Browse files · 4 files+8 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+8 added−7 removed

  • other:+8 added−7 removed

4 files+8 added−7 removed

modified:doc/fd.1+1 added-1 removed
189 unmodified lines
190Filter search by type:191.RS192.IP "f, file"193regular files194.IP "d, directory"194.IP "d, dir, directory"195directories196.IP "l, symlink"197symbolic links198.IP "b, block-device"
311 unmodified lines
modified:src/cli.rs+3 added-3 removed
312 unmodified lines
313 pub prune: bool,314315 /// Filter the search by type:316 /// {n} 'f' or 'file': regular files317 /// {n} 'd' or 'directory': directories317 /// {n} 'd' or 'dir' or 'directory': directories318 /// {n} 'l' or 'symlink': symbolic links319 /// {n} 's' or 'socket': socket320 /// {n} 'p' or 'pipe': named pipe (FIFO)321 /// {n} 'b' or 'block-device': block device
29 unmodified lines
351 short = 't',352 value_name = "filetype",353 hide_possible_values = true,354 value_enum,355 help = "Filter by type: file (f), directory (d), symlink (l), \355 help = "Filter by type: file (f), directory (d/dir), symlink (l), \356 executable (x), empty (e), socket (s), pipe (p), \357 char-device (c), block-device (b)",358 long_help359 )]
368 unmodified lines
728#[derive(Copy, Clone, PartialEq, Eq, ValueEnum)]729pub enum FileType {730 #[value(alias = "f")]731 File,732 #[value(alias = "d")]732 #[value(alias = "d", alias = "dir")]733 Directory,734 #[value(alias = "l")]735 Symlink,736 #[value(alias = "b")]
138 unmodified lines
modified:CHANGELOG.md+1 added
1# Upcoming release23## Features45- Add `dir` as an alias to `directory` when using `-t` \ `--type`, see #1460 and #1464 (@Ato2207).67## Bugfixes89- Respect NO_COLOR environment variable with `--list-details` option. (#1455)
740 unmodified lines
modified:README.md+3 added-3 removed
314 unmodified lines
315 -L, --follow Follow symbolic links316 -p, --full-path Search full abs. path (default: filename only)317 -d, --max-depth <depth> Set maximum search depth (default: none)318 -E, --exclude <pattern> Exclude entries that match the given glob pattern319 -t, --type <filetype> Filter by type: file (f), directory (d), symlink (l),320 executable (x), empty (e), socket (s), pipe (p), char-device321 (c), block-device (b)319 -t, --type <filetype> Filter by type: file (f), directory (d/dir), symlink (l),320 executable (x), empty (e), socket (s), pipe (p),321 block-device (b), char-device (c)322 -e, --extension <ext> Filter by file extension323 -S, --size <size> Limit results based on the size of files324 --changed-within <date|dur> Filter by file modification time (newer than)325 --changed-before <date|dur> Filter by file modification time (older than)
375 unmodified lines