Personal (auto-generated) Aliases Cheatsheet for Shell and Git aliases. This project provides an easy way to manage and view your aliases in Markdown, HTML, and PDF formats.
- Extract aliases and their descriptions from
.aliases
and.gitconfig
files. - Generate a Markdown document with all aliases.
- Generate a styled HTML document with a search filter to find aliases quickly.
- Generate a PDF document from the HTML content.
-
Python 3 should be installed on your machine.
-
wkhtmltopdf for PDF generation:
-
macOS:
brew install wkhtmltopdf
-
Linux:
sudo apt-get install wkhtmltopdf
-
Windows: Download and install from the official website.
-
Clone the repository:
git clone https://github.com/your-username/aliases-cheatsheet.git cd aliases-cheatsheet
-
Create a virtual environment:
make venv
-
Install the dependencies:
make install_deps
-
Generate the files:
make generate_files
- Markdown Document:
aliases.md
- HTML Document:
aliases.html
- PDF Document:
aliases.pdf
To ensure comments are correctly read and included in the generated files, follow the below-specific formatting rules:
Use comments prefixed with ##
directly above each alias definition.
Example .aliases
file:
## Lists files in long format
alias ll='ls -la'
## Shows the status of the git repo
alias gs='git status'
## Pushes commits to the remote repo
alias gp='git push'
Use comments prefixed with a semicolon ;
directly above each alias definition within the [alias]
section.
Example .gitconfig
file:
[alias]
; Checkout branches
co = checkout
; List branches
br = branch
; Commit changes
ci = commit
You can turn those into a searchable webpage that looks like this: