Skip to main content

Linux bash alias generator

Project description

topalias

Build Status Coverage GitLab pipeline Python Version

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

generated bash aliases

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

GPLv3

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


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.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distributions

topalias-1.2.1-py3.8.egg (11.1 kB view details)

Uploaded Source

topalias-1.2.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file topalias-1.2.1.tar.gz.

File metadata

  • Download URL: topalias-1.2.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for topalias-1.2.1.tar.gz
Algorithm Hash digest
SHA256 514ca72e70f79798c70cc043a69e0c11a9f39d21a6905334716b17382174dfc1
MD5 de0cfb4e6d3e953f75c8569da7d7cf90
BLAKE2b-256 83c2197c745458a3315aab21223729df15f47a48d9e667e6fb967dbbab79e484

See more details on using hashes here.

File details

Details for the file topalias-1.2.1-py3.8.egg.

File metadata

  • Download URL: topalias-1.2.1-py3.8.egg
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for topalias-1.2.1-py3.8.egg
Algorithm Hash digest
SHA256 0f41751fe86fde96af9782bb1b2569acfbce2739ebe0623d58843ca1b5a619ac
MD5 4715f1901b5b37d96b9768d0194d465c
BLAKE2b-256 259dd413eb0393bbd97811b0443728524957d30e77f3224675c62012180e95e7

See more details on using hashes here.

File details

Details for the file topalias-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: topalias-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for topalias-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36fdb446855d57c14ed492c574ab10208ad5c74fc0ce8c5250f1afce2a0631bc
MD5 3b4a1646e2346b1391e024b1c69baa75
BLAKE2b-256 5aa5a78af003cb9beb91278551ebde52a320d435a0015159ca93205a6cfafa9a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page