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 hashes)
Built Distribution
Close
Hashes for shorten_cli-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a52152dc4137b36d6787d3b1a5a2c595588efdbe8c45857b48992b899eeb13da |
|
MD5 | f4338c34dd4c07a2778377ca92bca8ff |
|
BLAKE2b-256 | 1857097b8e7962255d440651d1682bd40df9c6a151a20f3c486dc256a9864293 |