# prtl Small tool to keep track of your tagged directories. Portal to tagged locations quickly. ## Installation - ```cargo install prtl``` ## Build from Source - ```git clone https://github.com/ShounakA/prtl.git``` - ```cd prtl && cargo build --release``` ## Auto Configure Shorthand ```prtl ez-init --shell bash``` ```prtl ez-init --shell fish``` ## Manually Configure Shorthand ### Bash 1. Add a new shell file `path/to/your/newly/created/script/file.sh` with: ```bash function p() { if [[ $1 = "get" ]]; then cd $(prtl "$@") elif [ $1 = "set" ]; then $(prtl $@) else echo Global options will not work. Type \'prtl -h\' for more info. echo \'p\' short-hand only supports \'get\' and \'set\' commands. fi } ``` 2. Update your .bashrc | .bash_profile | .profile to include: ``` source path/to/your/newly/created/script/file.sh ``` ### Fish 1. Add file p.fish to `~/.config/fish/functions` with: ```fish function p if [ $argv[1] = "get" ] cd (eval prtl "$argv[1..-1]") else if [ $argv[1] = "set" ] eval prtl "$argv[1..-1]" else echo Global options will not work. Type \'prtl -h\' for more info. echo \'p\' short-hand only supports \'get\' and \'set\' commands. end end ``` ## Usage - ```prtl -h``` -> Help command - ```prtl set ``` -> Sets the given path (relative or full) as your default prtl - ```prtl set -t ``` -> Sets the given path to the given tag - ```prtl get``` -> Gets your default prtl, and prints to stdout - ```cd $(prtl get)``` -> Take the prtl to your default directory - ```cd $(prtl get )``` -> Take the prtl to a tagged prtl __With shorthand configured__ - ```p get``` is short for ```cd $(prtl get)``` - ```p get ``` is short for ```cd $(prtl get )``` - ```p set ``` is short for ```prtl set ``` - ```p set -t ``` is short for ```prtl set -t ``` ## Contribute Hello, if you stumble upon this repo and think it is worthy of your time you may contribute in the future. Currently, I don't have any PR templates, tests, or guides setup. But I may add them soon, stay tuned!