Simple Python Script which allows the creation of Linux like command aliases on Windows.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.landscape.yaml
.travis.yml
LICENSE
README.md
sample.aliases
setup.py

README.md

m-alias Build StatusCode Health

Simple alias creation for Windows

What does it do ?

It aims to make creation of Linux like command aliases easier by using a simple configuration file with a simple syntax.

What coding conventions are used ?

All files are linted with flake8 + pydocstring ignoring E501(line too long (82 > 79 characters)) and E116(unexpected indentation (comment)

Installation & Usage

Setup:

git clone git@github.com:Mojurasu/m-alias.git
cd m-alias\src
m-alias setup

If you run the setup.py it will give you the path of the current directory which when appended to your PATH environment variable will make the m-alias command accessible globally

Usage:

Adding a Command manually

Open the aliases.mcf file in your prefered Editor. Add an Alias like this:

aliasname='command'

aliasname this is the name/alias of the command.

command this is the command executed when aliasname is run.

Example:

ls='ls.exe -Aslh'

ls is the name

ls.exe is the command executed. The .exe is needed when the command and the alias have the same name (e.g. ls and ls) otherwise this will create an infinite loop (see W001)

Example File

Installing an .aliases file

Navigate to the file use m-alias install <file> to install the aliases. After that run m-alias update

Error and Warning Codes

Error Codes

E[001]:

When the platform the Program is ran on is not Windows this Error will be displayed.

E[002]:

The command you typed wasnt found. Try m-alias help to display availabe commands.

E[003]:

The option you are trying to use requires arguments. Check the text in the Parentheses to see what it requires

Warning Codes

W[001]:

If alias and command are the same (e.g ls or cd) and the command isnt explicit (e.g ls.exe). It could potentially create an infinite loop since the batch just calls itself instead of the original executable.