Alias To Go
Works on Linux, Windows and maybe macOS (not tried).
$ npm install -g alia
Please note: use single quotes for strings as double quotes will be interpreted by the Shell.
$ al -a gcm @ git commit -m
$ al gcm 'init'
$ al
Usage
$ al [options] [alias] [@] [command]
Options
--version, -v show version
--help, -h show this
--add, -a add alias (add -p for project alias)
--remove, -r remove alias (add -p for project alias)
--project, -p create project alia config
--list, -l list available alias
--conf, -c change alia configuration
separator [string] set alias separator (default: @)
token <your github api token> set the api token for gist sync
gist <your gist id> set the gist id to use for sync
--sync, -s backup/restore your config (default: restore)
push backup your current config
pull restore config from gist
Examples
$ al -a gp @ git push
> Added: gp @ git push
$ al gp
> git push
$ al -r gp
> Removed: gp
Alia allows you to backup/restore config from a gist using the commands:
al --sync push
to backup your config (push to gist)al --sync pull
to restore your config (pull from gist)
To get started:
- Create a new gist with a file titled
alia.json
. - Create a new GitHub token with the 'gist' permission.
- Setup Alia with the following commands:
al --conf token <api token>
al --conf gist <32-char gist id>
ISC © Eduard Kotkas