Define your per-directory command aliases in Yaml, to get quick shortcuts (and avoid having to remember long commands).
WARNING: This project is still experimental, and things may change suddenly. Suggestions are welcome.
Configuration
Configuration is held in a file, usually named ./.aliases, as a dictionary serialized in YAML format.
The main section is commands, a dict mapping alias names to their specification.
Command specification
command: command to be run, as a string
will be tokenized via shlex.split
string-format-style placeholders will be replaced:
positional arguments ({}, {1}) -> variadic arguments to the command
..or explicit: {args[1]}
environment: {env[USER]}
vars (see below): {vars[USER]}
extra arguments will be appended to the command
env: environment for the command
not considered in string formatting
will go through the same formatting as commands
vars: to be replaced in env/command formatting
Notes
we want some way to prevent automatic appending of varargs
we might want to use jinja for formatting, so we can have conditionals / defaults
we might want inheritance, rather than having “nested” aliasing
Examples
commands:
test:
command: xvfb-run py.test --reuse-db -vvv ./tests/
env:
DJANGO_SETTINGS_MODULE: fooproject.settings.testing
PYTHONPATH: "{env[HOME]}/Projects/fooproject"
commands:
manage:
command: python manage.py
env:
DJANGO_SETTINGS_MODULE: fooproject.settings.testing
PYTHONPATH: "{env[HOME]}/Projects/fooproject"
LOG_LEVEL: DEBUG
runserver:
command: aliasfile manage runserver
migrate:
command: aliasfile manage migrate
shell:
command: aliasfile manage shell
Metadata
Release files for aliasfile 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aliasfile-0.1.1.tar.gz | 9.0 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aliasfile-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
| aliasfile-0.1.1-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 33.0 kB
Release files / aliasfile-0.1.1.tar.gz
| Download URL | aliasfile-0.1.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff2629e44a6b3fb67a00c997ccee8ed6c850c7de4c5f6c7eaea4f5089ea78129
|
|
BLAKE2b-256 checksum How to use checksums |
fd7f664ae7e8ec3e8b708b9168677407cb93e7cbb869ae4569cf9f141bf9161b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aliasfile-0.1.1-py3-none-any.whl
| Download URL | aliasfile-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23ec4b14653ab5e988687b80f42e65ef041be6759126e5475c31abfa220096f9
|
|
BLAKE2b-256 checksum How to use checksums |
d842949137c5c9c6b568ae630574a20946bf078df15208623d7a07cdf98de0a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aliasfile-0.1.1-py2-none-any.whl
| Download URL | aliasfile-0.1.1-py2-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
a23a040856da8799341abb85a9c6a1bcd86b3fd4c89365d67fb39ce712c94a9f
|
|
BLAKE2b-256 checksum How to use checksums |
2e396074380e795e3f7d9dad6e9b8a86d7011ed9784c0774d391e2082381ceaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |