GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ruopsdev/topalias: Linux bash/zsh aliases generator

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

131 Commits
131 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
camo.githubusercontent.com/11c3a6b5dc3320254cbf185d39304b434a55b6a1de8bba19c5b6a455f1e85117
camo.githubusercontent.com/11c3a6b5dc3320254cbf185d39304b434a55b6a1de8bba19c5b6a455f1e85117
 
 
debian
debian
 
 
docs
docs
 
 
github.com/meteoritt
github.com/meteoritt
 
 
htmlcov
htmlcov
 
 
images
images
 
 
tests
tests
 
 
topalias
topalias
 
 
.all-contributorsrc
.all-contributorsrc
 
 
.coveragerc
.coveragerc
 
 
.coveralls.yml
.coveralls.yml
 
 
.deepsource.toml
.deepsource.toml
 
 
.dockerignore
.dockerignore
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.gitlab-ci.yml
.gitlab-ci.yml
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.pylintrc
.pylintrc
 
 
.readthedocs.yml
.readthedocs.yml
 
 
.travis.yml
.travis.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
PACKAGING.md
PACKAGING.md
 
 
PKGBUILD
PKGBUILD
 
 
Pipfile
Pipfile
 
 
Pipfile.lock
Pipfile.lock
 
 
README.md
README.md
 
 
fix.prompt.yml
fix.prompt.yml
 
 
nohup.out
nohup.out
 
 
package.json
package.json
 
 
poetry.lock
poetry.lock
 
 
poetry.toml
poetry.toml
 
 
pyproject.toml
pyproject.toml
 
 
renovate.json
renovate.json
 
 
requirements-dev.txt
requirements-dev.txt
 
 
requirements.txt
requirements.txt
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 
topalias.sh
topalias.sh
 
 
tox.ini
tox.ini
 
 
typos
typos
 
 
typos.toml
typos.toml
 
 

Repository files navigation

topalias

Test Coverage GitLab pipeline Python Version Downloads Code style: black Imports: isort DeepSource

topalias - Linux alias generator from bash/zsh command history with statistics, written on Python.

Features

  • Generate short alias for popular command from bash/zsh shell history
  • Command history statistics & analytics
  • Parametrised input
  • Console help for all commands, options and arguments
  • Shell workflow hints
  • Add support #PowerShell

Installation

From pypi.org repository:

pip3 install -U --user topalias

From source:

git clone https://github.com/CSRedRat/topalias
python3 topalias/setup.py install --user

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

Add PATH environment variable for run Python tools as Linux utility:

echo "export PATH=$PATH:$HOME/.local/bin" >> ~/.bashrc
source ~/.bashrc

Usage

generated bash aliases

Without parameters utility check if you use alias in ~/.bash_aliases - analyze and print usage statistics, then find new simple aliases

python3 -m topalias  # run as python module
topalias  # check aliases and print suggestion bash command history
topalias -h  # print help
topalias --zsh  # work with zsh shell command history
topalias --min=2  # set minimal length for generated acronym filter, so that exclude some short command and find long, hard, usable command
topalias --debug history  # only analyze local bash history and print filtered rows

Files path search order:

  • directory from execution parameter
  • .bash_history in . current directory
  • .bash_history in ~ user home directory
  • example development files in topalias/data

You can change dot files search path to another user home directory:

topalias -f /home/user  # or topalias --path /home/user

Also you can use topalias utility in Bash for Git on Windows and in WSL.

Documentation

Usage: topalias [OPTIONS] COMMAND [ARGS]

Options:
  -l, --min INTEGER     Print alias acronym not less that value. Default: 1
  -c, --count INTEGER   Print specified number acronym suggestions. Default:
                        20

  --filter              Filter used aliases in history. Default: False
  -z, --zsh             Use zsh shell history file .zsh_history. Default:
                        False

  -f, --path TEXT       Change custom directory for files: .bash_aliases,
                        .bash_history, .zsh_history

  --version             Print current program version and check latest on
                        pypi.org.

  --debug / --no-debug  Enable debug strings in output.
  -h, --help            Show this message and exit.

Commands:
  hint     Print all hints.
  history  Print bash history file.
  version  Get program current and available version.

TODO

  • check if alias name already used
  • check if alias already added
  • add any another acronym algorithm with semantic
  • more statistics & analytics (used dir, utils, parameters, time)
  • alias max length parameter
  • command ignore list flag: top, emacs, vim
  • often used command "ssh username@servername" suggest add to .ssh/config/

License

GPLv3

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Sergey Chudakov

💻 🚇 🤔 🚧 📦

Sergey Morozik

🚧 📦💻

GitLab repository mirror with CI/CD: https://gitlab.com/CSRedRat/topalias

About

Linux bash/zsh aliases generator

pypi.org/project/topalias

Topics

aliasalias-managementaliasesaliases-setupaliasingbashcliclickcmdcommand-lineconsolehistorylinuxpypipythonshellterminaltopzsh

Resources

Readme
GPL-3.0 license

Contributing

Contributing
Activity
Custom properties

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.