cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.
Use cheat with cheatsheets.
The next time you're forced to disarm a nuclear weapon without consulting Google, you may run:
You will be presented with a cheatsheet resembling the following:
To view a cheatsheet:
To edit a cheatsheet:
To view the configured cheatpaths:
To list all available cheatsheets:
To list all cheatsheets that are tagged with "networking":
To list all cheatsheets on the "personal" path:
To search for the phrase "ssh" among cheatsheets:
To search (by regex) for cheatsheets that contain an IP address:
Flags may be combined in intuitive ways. Example: to search sheets on the "personal" cheatpath that are tagged with "networking" and match a regex:
For installation and configuration instructions, see INSTALLING.md.
Cheatsheets are plain-text files with no file extension, and are named according to the command used to view them:
Cheatsheet text may optionally be preceeded by a YAML frontmatter header that assigns tags and specifies syntax:
The cheat executable includes no cheatsheets, but community-sourced cheatsheets are available. You will be asked if you would like to install the community-sourced cheatsheets the first time you run cheat.
Cheatsheets are stored on "cheatpaths", which are directories that contain cheatsheets. Cheatpaths are specified in the conf.yml file.
It can be useful to configure cheat against multiple cheatpaths. A common pattern is to store cheatsheets from multiple repositories on individual cheatpaths:
The readonly option instructs cheat not to edit (or create) any cheatsheets on the path. This is useful to prevent merge-conflicts from arising on upstream cheatsheet repositories.
If a user attempts to edit a cheatsheet on a read-only cheatpath, cheat will transparently copy that sheet to a writeable directory before opening it for editing.
At times, it can be useful to closely associate cheatsheets with a directory on your filesystem. cheat facilitates this by searching for a .cheat folder in the current working directory. If found, the .cheat directory will (temporarily) be added to the cheatpaths.
Shell autocompletion is currently available for bash, fish, and zsh. Copy the relevant completion script into the appropriate directory on your filesystem to enable autocompletion. (This directory will vary depending on operating system and shell specifics.)
Additionally, cheat supports enhanced autocompletion via integration with fzf. To enable fzf integration:
Link nội dung: http://thoitiet247.edu.vn/cheat-a10108.html