Skip to main content

# Shorten

Simple (Python) tool to shorten any command in your terminal.

`shorten` takes the place of adding aliases in your bash profile. It also makes a few things a more convenient. For example, you can
1. create an alias from any location,
2. list your aliases and
3. search aliases by leading characters.


Let me know if you experience any issues!

## Things you can do

**Create an alias.** Call `shorten` (from anywhere!) on any command and give it an alias.

```
$ shorten echo e
Alias successfully added.
```
```
$ # Let's try it out!
$ echo 'Hello, world!'
Hello, world!
```

**Remove an alias.** Call `shorten delete`.
```
$ shorten delete e
```

**List all your aliases.**
```
$ shorten list all

Alias Command
----- -------
ipynb jupyter notebook
jlab jupyter lab
e echo
```

**List aliases that start with substring.**
```
$ shorten list ip

Alias Command
----- -------
ipynb jupyter notebook
```

**Protip**: shorten `shorten` ;).
```
$ shorten shorten s
```

## How does it work?

*Shorten* creates a hidden folder in your home directory. This is where your aliases will be stored. Each alias is actually a python script that redirects the alias to the true command.

*Shorten* adds a line to your bash profile that points your $PATH variable to `~/.shorten`. If you can't get your aliases to work (or you're using another shell like Zsh), check that the following line is in the right `rc` file.

```
export PATH="~/.shorten:$PATH"
```


## Install

Clone this repo and pip install:
```
pip install -e .
```


Metadata

Release files for shorten-cli 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shorten-cli 0.1
File Size Uploaded Provenance Actions
shorten-cli-0.1.tar.gz 4.6 kB Without provenance Details for shorten-cli-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shorten-cli 0.1
File Interpreter ABI Platform Actions
shorten_cli-0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for shorten_cli-0.1-py2.py3-none-any.whl

Total release size: 10.7 kB

Release files / shorten-cli-0.1.tar.gz

Download URL shorten-cli-0.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
68d390e17c28331dd94727c4401536f3c3fb05e56b4345676d467d1fd3da41b9
BLAKE2b-256 checksum
How to use checksums
54a209d30c67c18b57ab67615b28190d2797d7899e32cb4911ce1e0664bcfd73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / shorten_cli-0.1-py2.py3-none-any.whl

Download URL shorten_cli-0.1-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a52152dc4137b36d6787d3b1a5a2c595588efdbe8c45857b48992b899eeb13da
BLAKE2b-256 checksum
How to use checksums
1857097b8e7962255d440651d1682bd40df9c6a151a20f3c486dc256a9864293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for shorten-cli 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page