2022-03-19 17:01:11 +01:00
|
|
|
.\" Automatically generated by Pandoc 2.14.2
|
2020-03-25 01:19:33 +01:00
|
|
|
.\"
|
2020-03-25 01:52:14 +01:00
|
|
|
.TH "CHEAT" "1" "" "" "General Commands Manual"
|
2020-03-25 01:19:33 +01:00
|
|
|
.hy
|
|
|
|
.SH NAME
|
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]cheat\f[R] \[em] create and view command-line cheatsheets
|
2020-03-25 01:19:33 +01:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]cheat\f[R] [options] [\f[I]CHEATSHEET\f[R]]
|
2020-03-25 01:19:33 +01:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]cheat\f[R] allows you to create and view interactive cheatsheets on
|
|
|
|
the command-line.
|
2020-03-25 01:19:33 +01:00
|
|
|
It was designed to help remind *nix system administrators of options for
|
|
|
|
commands that they use frequently, but not frequently enough to
|
|
|
|
remember.
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
\[en]init
|
2020-03-25 01:19:33 +01:00
|
|
|
Print a config file to stdout.
|
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
-c, \[en]colorize
|
2020-03-25 01:19:33 +01:00
|
|
|
Colorize output.
|
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
-C, \[en]config
|
|
|
|
Print config path
|
|
|
|
.TP
|
|
|
|
-d, \[en]directories
|
2020-03-25 01:19:33 +01:00
|
|
|
List cheatsheet directories.
|
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
-e, \[en]edit=\f[I]CHEATSHEET\f[R]
|
|
|
|
Open \f[I]CHEATSHEET\f[R] for editing.
|
2020-03-25 01:19:33 +01:00
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
-l, \[en]list
|
2020-03-25 01:19:33 +01:00
|
|
|
List available cheatsheets.
|
2022-03-19 17:01:11 +01:00
|
|
|
.TP
|
|
|
|
-p, \[en]path=\f[I]PATH\f[R]
|
|
|
|
Filter only to sheets found on path \f[I]PATH\f[R].
|
|
|
|
.TP
|
|
|
|
-r, \[en]regex
|
|
|
|
Treat search \f[I]PHRASE\f[R] as a regular expression.
|
|
|
|
.TP
|
|
|
|
-s, \[en]search=\f[I]PHRASE\f[R]
|
|
|
|
Search cheatsheets for \f[I]PHRASE\f[R].
|
|
|
|
.TP
|
|
|
|
-t, \[en]tag=\f[I]TAG\f[R]
|
|
|
|
Filter only to sheets tagged with \f[I]TAG\f[R].
|
|
|
|
.TP
|
|
|
|
-T, \[en]tags
|
2020-03-25 01:19:33 +01:00
|
|
|
List all tags in use.
|
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
-v, \[en]version
|
2020-03-25 01:19:33 +01:00
|
|
|
Print the version number.
|
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
\[en]rm=\f[I]CHEATSHEET\f[R]
|
|
|
|
Remove (deletes) \f[I]CHEATSHEET\f[R].
|
2020-03-25 01:19:33 +01:00
|
|
|
.SH EXAMPLES
|
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
To view the foo cheatsheet:
|
|
|
|
cheat \f[I]foo\f[R]
|
|
|
|
.TP
|
|
|
|
To edit (or create) the foo cheatsheet:
|
|
|
|
cheat -e \f[I]foo\f[R]
|
|
|
|
.TP
|
|
|
|
To edit (or create) the foo/bar cheatsheet on the `work' cheatpath:
|
|
|
|
cheat -p \f[I]work\f[R] -e \f[I]foo/bar\f[R]
|
|
|
|
.TP
|
|
|
|
To view all cheatsheet directories:
|
|
|
|
cheat -d
|
|
|
|
.TP
|
|
|
|
To list all available cheatsheets:
|
|
|
|
cheat -l
|
|
|
|
.TP
|
|
|
|
To list all cheatsheets whose titles match `apt':
|
|
|
|
cheat -l \f[I]apt\f[R]
|
|
|
|
.TP
|
|
|
|
To list all tags in use:
|
|
|
|
cheat -T
|
|
|
|
.TP
|
|
|
|
To list available cheatsheets that are tagged as `personal':
|
|
|
|
cheat -l -t \f[I]personal\f[R]
|
|
|
|
.TP
|
|
|
|
To search for `ssh' among all cheatsheets, and colorize matches:
|
|
|
|
cheat -c -s \f[I]ssh\f[R]
|
|
|
|
.TP
|
|
|
|
To search (by regex) for cheatsheets that contain an IP address:
|
|
|
|
cheat -c -r -s \f[I]`(?:[0-9]{1,3}.){3}[0-9]{1,3}'\f[R]
|
|
|
|
.TP
|
|
|
|
To remove (delete) the foo/bar cheatsheet:
|
|
|
|
cheat \[en]rm \f[I]foo/bar\f[R]
|
2020-03-25 01:19:33 +01:00
|
|
|
.SH FILES
|
|
|
|
.SS Configuration
|
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]cheat\f[R] is configured via a YAML file that is conventionally
|
|
|
|
named \f[I]conf.yaml\f[R].
|
|
|
|
\f[B]cheat\f[R] will search for \f[I]conf.yaml\f[R] in varying
|
|
|
|
locations, depending upon your platform:
|
2020-03-25 01:19:33 +01:00
|
|
|
.SS Linux, OSX, and other Unixes
|
|
|
|
.IP "1." 3
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]CHEAT_CONFIG_PATH\f[R]
|
2020-03-25 01:19:33 +01:00
|
|
|
.IP "2." 3
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]XDG_CONFIG_HOME\f[R]/cheat/conf.yaml
|
2020-03-25 01:19:33 +01:00
|
|
|
.IP "3." 3
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]$HOME\f[R]/.config/cheat/conf.yml
|
2020-03-25 01:19:33 +01:00
|
|
|
.IP "4." 3
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]$HOME\f[R]/.cheat/conf.yml
|
2020-03-25 01:19:33 +01:00
|
|
|
.SS Windows
|
|
|
|
.IP "1." 3
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]CHEAT_CONFIG_PATH\f[R]
|
2020-03-25 01:19:33 +01:00
|
|
|
.IP "2." 3
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]APPDATA\f[R]/cheat/conf.yml
|
2020-03-25 01:19:33 +01:00
|
|
|
.IP "3." 3
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]PROGRAMDATA\f[R]/cheat/conf.yml
|
2020-03-25 01:19:33 +01:00
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]cheat\f[R] will search in the order specified above.
|
|
|
|
The first \f[I]conf.yaml\f[R] encountered will be respected.
|
2020-03-25 01:19:33 +01:00
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
If \f[B]cheat\f[R] cannot locate a config file, it will ask if you\[cq]d
|
|
|
|
like to generate one automatically.
|
2020-03-25 01:19:33 +01:00
|
|
|
Alternatively, you may also generate a config file manually by running
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]cheat \[en]init\f[R] and saving its output to the appropriate
|
2020-03-25 01:19:33 +01:00
|
|
|
location for your platform.
|
|
|
|
.SS Cheatpaths
|
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]cheat\f[R] reads its cheatsheets from \[lq]cheatpaths\[rq], which
|
2020-11-03 23:59:56 +01:00
|
|
|
are the directories in which cheatsheets are stored.
|
2022-03-19 17:01:11 +01:00
|
|
|
Cheatpaths may be configured in \f[I]conf.yaml\f[R], and viewed via
|
|
|
|
\f[B]cheat -d\f[R].
|
2020-03-25 01:19:33 +01:00
|
|
|
.PP
|
|
|
|
For detailed instructions on how to configure cheatpaths, please refer
|
|
|
|
to the comments in conf.yml.
|
|
|
|
.SS Autocompletion
|
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
Autocompletion scripts for \f[B]bash\f[R], \f[B]zsh\f[R], and
|
|
|
|
\f[B]fish\f[R] are available for download:
|
2020-03-25 01:19:33 +01:00
|
|
|
.IP \[bu] 2
|
|
|
|
<https://github.com/cheat/cheat/blob/master/scripts/cheat.bash>
|
|
|
|
.IP \[bu] 2
|
|
|
|
<https://github.com/cheat/cheat/blob/master/scripts/cheat.fish>
|
2020-04-08 00:47:35 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
<https://github.com/cheat/cheat/blob/master/scripts/cheat.zsh>
|
2020-03-25 01:19:33 +01:00
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
The \f[B]bash\f[R] and \f[B]zsh\f[R] scripts provide optional
|
|
|
|
integration with \f[B]fzf\f[R], if the latter is available on your
|
|
|
|
\f[B]PATH\f[R].
|
2020-03-25 01:19:33 +01:00
|
|
|
.PP
|
|
|
|
The installation process will vary per system and shell configuration,
|
|
|
|
and thus will not be discussed here.
|
|
|
|
.SH ENVIRONMENT
|
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]CHEAT_CONFIG_PATH\f[R]
|
2020-03-25 01:19:33 +01:00
|
|
|
The path at which the config file is available.
|
2022-03-19 17:01:11 +01:00
|
|
|
If \f[B]CHEAT_CONFIG_PATH\f[R] is set, all other config paths will be
|
2020-03-25 01:19:33 +01:00
|
|
|
ignored.
|
2020-04-08 00:47:35 +02:00
|
|
|
.TP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]CHEAT_USE_FZF\f[R]
|
2020-04-08 00:47:35 +02:00
|
|
|
If set, autocompletion scripts will attempt to integrate with
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]fzf\f[R].
|
2020-06-26 00:38:03 +02:00
|
|
|
.SH RETURN VALUES
|
|
|
|
.IP "0." 3
|
|
|
|
Successful termination
|
|
|
|
.IP "1." 3
|
|
|
|
Application error
|
|
|
|
.IP "2." 3
|
|
|
|
Cheatsheet(s) not found
|
2020-03-25 01:19:33 +01:00
|
|
|
.SH BUGS
|
|
|
|
.PP
|
|
|
|
See GitHub issues: <https://github.com/cheat/cheat/issues>
|
|
|
|
.SH AUTHOR
|
|
|
|
.PP
|
|
|
|
Christopher Allen Lane <chris@chris-allen-lane.com>
|
|
|
|
.SH SEE ALSO
|
|
|
|
.PP
|
2022-03-19 17:01:11 +01:00
|
|
|
\f[B]fzf(1)\f[R]
|