- Shell 100%
| battery.md | Restructure battery.md | |
| git.md | add: git (history rewrites) | |
| LICENSE | Uncomment writing a header line before cheat content | |
| memory.md | add: disk usage tools | |
| pacman.md | chore: usage of arbitrary AUR-helper | |
| README.md | Update README (CC0 license for individual sheets) | |
| showcheat.sh | feat: run command directly, check md code prefix + ask user to exec | |
cheatsheets, tools for CLI usecases
Spicker to avoid RTFM + online search for useful, but unfrequent tasks.
The cheatsheets are written in a short reference style with minimal explanation (you know what to do, but not the exact tool or arguments). This project is basically a collection of short Markdown files and a bash script listing and dumping them.
Usage
You may clone the repo and define an alias pointing to some/path/showcheat.sh.
There are three modes.
- Without any argument, you are asked which cheatsheet you want to see.
- You may pass a cheatsheet name directly, skipping the selection step (without
.mdsuffix). - When you pass a cheatsheet name and a number,
the script prints the line from the cheatsheet and asks for your confirmation
to execute it. Only lines starting with 4 spaces can be executed,
this complies to markdown
codesyntax.
A call with --help lists possible usage:
$ cheat --help
usage:
cheat --help : show this help
cheat : select a cheatsheet to show
cheat <cs> : show cheatsheet <cs>
cheat <cs> <ln> : execute line <ln> from <cn>
(arch linux: AUR-helper)
If you want to run commands from pacman.md
directly, you need to add a wrapper
for your favourite AUR-helper.
Add an executable file with paru "@"
(or any other AUR-helper) to your PATH.
showcheats.sh checks for executables,
so environment variables and aliases don't work
straightforward.
License
The script showcheat.sh is distributed under EUPL.
The individual cheatsheets are distribted under CC0 (~ public domain).
Contributing
Feel free to suggest changes and additions. If your tool or usecase is missing, just add it as PR.
(With only a handful of cheatsheets selecting via bash select is fine.)