Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alias Version Test status

Manage command aliases in Windows.

Installation

> pip install alias-windows

By default aliases are stored in %USERPROFILE%\Documents\Scripts\Aliases. You can set the directory to store aliases by changing the environment variable called %ALIASES_DIR%.

Managing aliases

Get the list of available aliases

REM Default output
> alias
apktool, gsh, gst

REM Verbosed output
> alias -v
apktool = %SOFTWARE%\apktool\apktool.bat %*
gsh = git show $*
gst = git status --short --branch %*

Add an alias

> alias test=dir \b %*
Added test

Add an alias with multiple commands

REM Use double quotes to wrap commands joined with &&
> alias gpht="git push %* && git push --tags %*"

Show the alias

REM List aliases start with a given input
> alias g
gsh, gst

REM Show the alias
> alias test
dir \b %*

Search for a text in alias commands

REM Default output
> alias -s apk
baksmali, smali

REM Verbosed output
> alias -s apk -v
baksmali = %SOFTWARE%\apktool\apktool.bat d %*
smali = %SOFTWARE%\apktool\apktool.bat b %*

Delete the alias

> alias -d test
Deleted test

Environment variables

alias uses two environment variables:

  • %ALIASES_DIR% which refers to a directory where aliases are stored
  • %PATH% which is appended with the directory specified in the %ALIASES_DIR% variable

License

This project is licensed under the MIT License.

Releases

Used by

Contributors

Languages