1
1
Fork
You've already forked cli_cheatsheet
0
Spicker to avoid RTFM + online search for useful, but unfrequent tasks.
  • Shell 100%
2025年02月04日 01:38:07 +01:00
battery.md Restructure battery.md 2025年02月04日 01:21:37 +01:00
git.md add: git (history rewrites) 2025年02月04日 01:24:19 +01:00
LICENSE Uncomment writing a header line before cheat content 2025年02月04日 01:21:11 +01:00
memory.md add: disk usage tools 2025年02月04日 01:21:45 +01:00
pacman.md chore: usage of arbitrary AUR-helper 2025年02月04日 01:21:45 +01:00
README.md Update README (CC0 license for individual sheets) 2025年02月04日 01:38:07 +01:00
showcheat.sh feat: run command directly, check md code prefix + ask user to exec 2025年02月04日 01:21:37 +01:00

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.

  1. Without any argument, you are asked which cheatsheet you want to see.
  2. You may pass a cheatsheet name directly, skipping the selection step (without .md suffix).
  3. 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 code syntax.

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.)