Simple (Python) tool to shorten any command in your terminal.
Project description
# 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 .
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shorten-cli-0.1.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file shorten-cli-0.1.tar.gz
.
File metadata
- Download URL: shorten-cli-0.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d390e17c28331dd94727c4401536f3c3fb05e56b4345676d467d1fd3da41b9 |
|
MD5 | dfea68b3d36fdd5ce4e773d01373f2e3 |
|
BLAKE2b-256 | 54a209d30c67c18b57ab67615b28190d2797d7899e32cb4911ce1e0664bcfd73 |
File details
Details for the file shorten_cli-0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: shorten_cli-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a52152dc4137b36d6787d3b1a5a2c595588efdbe8c45857b48992b899eeb13da |
|
MD5 | f4338c34dd4c07a2778377ca92bca8ff |
|
BLAKE2b-256 | 1857097b8e7962255d440651d1682bd40df9c6a151a20f3c486dc256a9864293 |