-
Notifications
You must be signed in to change notification settings - Fork 5
Basic usage
The set of files for multiline search mode and single line search mode are separate.
For example, the following restricts multiline search mode files to just markdown files in the current directory. But since we have not reset the single line mode files, if there are any, say, csv files present, they would also be captured:
$ docfd --exts md
To really restrict to just markdown files, do:
$ docfd --exts md --single-line-exts ""
$ docfd --add-exts sql --single-line-add-exts debug-log
Alternatively, since using --glob prevents Docfd from defaulting to scanning .,
we can do the following to recursively grab all markdown files without considering --exts and --single-line-exts:
$ docfd --glob '**.md'
or add \c anywhere in the string for case-insensitive match just in case of inconsistent casing of file extension, e.g. Md, MD.
$ docfd --glob '**.md\c'
See File collection rules for details on how the combination of file collection related command line arguments affect overall behavior.
Resolution of relative globs starts at current working directory.
$ docfd [PATH]... ?
The ? can be in any position in the path list.
If any of the path is ?, then file selection
of the discovered files
via fzf
is invoked.
$ command | docfd
No paths should be supplied as arguments in this case. If any paths are specified, then stdin is ignored.
TODO
$ docfd [PATH]... --paths-from paths.txt
The final list of paths used is then the concatenation
of PATHs and paths listed in paths.txt, which
has one path per line.
In Docfd, most UI interactions are mapped to a command. This includes search and filter.
To undo the last command, press u, Ctrl+Z or Left arrow
To redo the command, press Ctrl+R, Ctrl+Y or Right arrow