Linux bash alias generator
Project description
topalias
topalias - Linux bash/zsh alias generator and statistics from command history, written on Python.
Features
- Generate short alias for popular command from bash history
- Fully typed with annotations and checked with mypy, PEP561 compatible
Installation
From pypi.org repository:
pip3 install -U --user topalias
From source:
git clone https://github.com/CSRedRat/topalias
python3 topalias/setup.py install
Run as python script without install:
git clone https://github.com/CSRedRat/topalias
python3 topalias/topalias/cli.py -h
Install requirements
sudo apt install python3 python3-pip -y
Usage
Showcase how your project can be used:
topalias # check if you uses aliases in ~/.bash_aliases - analyze and print usage statistics, offers to find new simple aliases
topalias -h # print help
topalias history # analyze local bash history
topalias h --acr=2 # set minimal length for generated acronym filter, so that exclude some short command and find long, hard, usable command
File path search order:
- .bash_history in current . directory
- .bash_history in home ~ directory
- example development files in topalias/data
Run as python module:
python3 -m topalias
Also you can use topalias utility in Bash for Git on Windows and in WSL.
TODO
- zsh support
- exclude used alias from command chart
- alias use statistic
- only util in command without parameters usage statistic
- history file path parameter
- top command count parameter
- alias max length parameter
- snap package
- flatpak package
Please add you feature requests: https://github.com/CSRedRat/topalias/issues/new
License
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Sergey Chudakov 💻 🚇 🤔 🚧 📦 🧑🏫 💡 |
GitLab repository mirror with CI/CD: https://gitlab.com/CSRedRat/topalias GitHub Pages: https://csredrat.github.io/topalias/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
topalias-1.2.4.tar.gz
(13.3 kB
view hashes)
Built Distributions
topalias-1.2.4-py3-none-any.whl
(13.1 kB
view hashes)
Close
Hashes for topalias-1.2.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b60ea250a5432c92afa216925837d61d102f05d70a13fcbd7541d28654b6f43b |
|
MD5 | 6f650cf8ed3d115a0e8848d30abe6102 |
|
BLAKE2b-256 | 04341fb6e95e9535df9de4c0ee7063b7b32eaa19dc2d8ecd3709d493c29d9bac |