Path shortcuts manager
If you are curious on how does p works check out my article on Medium:
Just clone the repo somewhere and source p.sh
into your shell rc (~/.zshrc or
~/.bashrc or whatever you use).
cd <script_install_location>
git clone git@github.com:ddmendes/p.git
echo "source <script_install_location>/p/p.sh" >> ~/.zshrc
The script will keep it's data in ~/.pdata.properties
. If you want to change
it export P_PROPERTIES_FILE
with new file location and name.
export P_PROPERTIES_FILE="<script_install_location>/p/.pdata.properties"
p set <alias> <path>
p list [<alias>]
p rm <alias>
p <alias>
- set: Stores (add or edit) a shortcut for directory with key .
- list: If no alias is given list all known alias=path. If alias is given list according path.
- rm: Remove an alias.
- <alias>: Change working directory to respective path for the given alias.
Feel free to open a PR, file a bug or just request a feature.