Define shell shortcut and execute it.
Install pyalias
$: pip install pyalias
Add a configure file at ~/.config/pyalias.yaml .. code:
- name: test description: functional test command: echo 'test' - name: ssh description: test ssh command: sshpass -p "password" ssh user@host4
List shortcut
$ pyalias list * [test] functional test * [ssh] test ssh
Execute shortcut
$ pyalias ssh Welcome to Ubuntu 20.04.1 LTS (GNU/Linux x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage Welcome to Alibaba Cloud Elastic Compute Service !