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

Add fd.1 man page, close #77 #125

Merged
merged 2 commits into from
Oct 19, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions doc/fd.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
.TH FD 1 fd-4.0.0
.SH NAME
fd \- find files
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be a little bit more detailed: "fd - find entries in the filesystem"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took that from the posix man page and sbase man page. Both uses that.

.BR find (1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for? is it a link to find? Do we need this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is a link to find since it's on the current description.

.SH SYNOPSIS
.B spt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fd, probably 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops, sorry. :P

.RB [ \-HIsaLp0hV ]
.RB [ \- d
.IR depth ]
.RB [ \-t
.IR filetype ]
.RB [ \-e
.IR ext ]
.RB [ \-c
.IR when ]
.RB [ \-j
.IR num ]
.RI [ pattern ]
.RI [ path ]
.SH DESCRIPTION
.B fd
is a simple, fast and user-friendly alternative to
.BR find (1).
.SH OPTIONS
.TP
.B \-H, \-\-hidden
Search hidden files and directories.
.TP
.B \-I, \-\-no\-gitignore
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be --no-ignore.

Do not respect any
.BR gitignore (5)
files.
.TP
.B \-s, \-\-case\-insensitive
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be --case-sensitive

Perform a case-sensitive search (default: smart case).
.TP
.B \-a, \-\-absolute\-path
Show absolute instead of relative paths.
.TP
.B \-L, \-\-follow
Dereference all symbolic links encountered.
.TP
.B \-p, \-\-full\-path
Match
.I pattern
against full path.
.TP
.B \-0, \-\-print0
Print results followed by a null character (instead of newlines).
.TP
.B \-h, \-\-help
Prints help information.
.TP
.B \-v, \-\-version
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be -V, not -v.

Prints version information.
.TP
.BI "\-d, \-\-max\-depth " levels
Limit directory traversal to at most
.I levels
of depth.
.TP
.BI "\-t, \-\-type " c
Filter search by type:
.RS
.IP "f, file"
regular files
.IP "d, directories"
directories
.IP "s, symlink"
symbolic links
.RE
.TP
.BI "\-e, \-\-extension " ext
Filter search results by file extension
.IR ext .
.TP
.BI "\-c, \-\-color " when
Declare
.I when
to use color for the pattern match output:
.RS
.IP auto
Show colors only when standard output is connected to a terminal. (default)
.IP never
Do not use colorized output.
.IP always
Always use colorized output.
.RE
.TP
.BI "\-j, \-\-threads " num
Specifies number of threads to use for searching. (default: number of available
CPU cores)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add the new option -x, --exec?

.SH ENVIRONMENT
.TP
LS_COLORS
.BR "fd"'s
color codes for search results.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LS_COLORS is also used by ls and typically set by dircolors. Maybe we should say something like: "determines how to colorize the search results, see DIRCOLORS(1)".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice suggestion, I don't have better idea to write this environment part.

.SH EXAMPLES
.TP
.RI "Find the specific log files in " /var/log .
$ fd nginx.log /var/log
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just use fd nginx /var/log here. The . can actually mean "any character" in a regex, so this does not perform a literal search for "nginx.log".

.TP
Find all Python files that ends with \(dq.py\(dq in the current directory.
$ fd -e py
.SH SEE ALSO
.BR find (1)