diff --git a/README.md b/README.md index b4a96de..65df28a 100644 --- a/README.md +++ b/README.md @@ -153,11 +153,11 @@ FLAGS: OPTIONS: -d, --max-depth Set maximum search depth (default: none) - -t, --type Filter by type: f(ile), d(irectory), s(ymlink) + -t, --type Filter by type: f(ile), d(irectory), s(ymlink) -e, --extension Filter by file extension - -c, --color When to use color in the output: + -c, --color When to use color in the output: never, auto, always (default: auto) - -j, --threads Set number of threads to use for searching + -j, --threads Set number of threads to use for searching: (default: number of available CPU cores) ARGS: diff --git a/src/app.rs b/src/app.rs index b136592..d5f29bf 100644 --- a/src/app.rs +++ b/src/app.rs @@ -87,64 +87,63 @@ fn usage() -> HashMap<&'static str, Help> { let mut h = HashMap::new(); doc!(h, "hidden" , "Search hidden files and directories" - , "Also include hidden directories and files in the search results (default: hidden files\ - and directories are skipped)."); + , "Include hidden directories and files in the search results (default: hidden files \ + and directories are skipped)."); doc!(h, "no-ignore" , "Do not respect .(git)ignore files" - , "Show search results from files and directories that would otherwise be ignored by\ + , "Show search results from files and directories that would otherwise be ignored by \ '.*ignore' files."); doc!(h, "case-sensitive" , "Case-sensitive search (default: smart case)" - , "Define your pattern as case sensitive. By default, fd uses 'smart case' for queries.\ - This option disables smart case."); + , "Perform a case-sensitive search. By default, fd uses case-insensitive searches, \ + unless the pattern contains both upper- and lowercase characters (smart case)."); doc!(h, "absolute-path" , "Show absolute instead of relative paths" - , "Shows the result of a pattern match as an absolute path instead of relative path."); + , "Shows the full path starting from the root as opposed to relative paths."); doc!(h, "follow" , "Follow symbolic links" , "By default, fd does not descent into symlinked directories. Using this flag, symbolic \ - links are also traversed."); + links are also traversed."); doc!(h, "full-path" , "Search full path (default: file-/dirname only)" - , "Searches the full path of directory. By default, fd only searches the last part of \ - the path (the file name or the directory name)."); + , "By default, the search pattern is only matched against the filename (or directory \ + name). Using this flag, the pattern is matched against the full path."); doc!(h, "null_separator" , "Separate results by the null character" - , "Separate search results by the null character (instead of newlines). This is useful \ - for piping results to 'xargs'."); + , "Separate search results by the null character (instead of newlines). Useful for \ + piping results to 'xargs'."); doc!(h, "depth" , "Set maximum search depth (default: none)" - , "Set the limit of the maximum search depth in a pattern match query. By default, there\ - is no limit on the search depth."); + , "Limit the directory traversal to a given depth. By default, there is no limit \ + on the search depth."); doc!(h, "file-type" , "Filter by type: f(ile), d(irectory), s(ymlink)" - , "Filter the search by type:\n\ - f file for file\n\ - d directory for directory\n\ - s symlink for symbolic links"); + , "Filter the search by type:\n \ + 'f' or 'file': regular files\n \ + 'd' or 'directory': directories\n \ + 's' or 'symlink': symbolic links"); doc!(h, "extension" , "Filter by file extension" - , "Only show search results with a specific file extension."); + , "(Additionally) filter search results by their file extension."); doc!(h, "color" - , "When to use color in the output:\n\ - never, auto, always (default: auto)" - , "Declare when to use color for the pattern match output:\n\ - auto (default)\n\ - never\n\ - always"); + , "When to use colors: never, *auto*, always" + , "Declare when to use color for the pattern match output:\n \ + 'auto': show colors if the output goes to an interactive console (default)\n \ + 'never': do not use colorized output\n \ + 'always': always use colorized output"); doc!(h, "threads" - , "Set number of threads to use for searching:\n\ - (default: number of available CPU cores)"); + , "Set number of threads to use for searching" + , "Set number of threads to use for searching (default: number of available CPU cores)"); doc!(h, "max-buffer-time" , "the time (in ms) to buffer, before streaming to the console" , "Amount of time in milliseconds to buffer, before streaming the search results to\ - the console."); + the console."); doc!(h, "pattern" , "the search pattern, a regular expression (optional)"); doc!(h, "path" , "the root directory for the filesystem search (optional)" - , "The root directory where you want to do the filesystem search of the pattern.\ - When not present, the default is to use the current working directory."); + , "The directory where the filesystem search is rooted (optional). \ + If omitted, search the current working directory."); h }