| Crates.io | prtl |
| lib.rs | prtl |
| version | 0.3.0 |
| created_at | 2023-02-01 22:50:31.848404+00 |
| updated_at | 2023-06-21 07:59:20.634002+00 |
| description | Jump to tagged directories quickly with prtl. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 774318 |
| size | 54,686 |
Small tool to keep track of your tagged directories. Portal to tagged locations quickly.
cargo install prtlgit clone https://github.com/ShounakA/prtl.gitcd prtl && cargo build --releaseprtl ez-init --shell bash
prtl ez-init --shell fish
path/to/your/newly/created/script/file.sh with:
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
}
source path/to/your/newly/created/script/file.sh~/.config/fish/functions with:
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
prtl -h -> Help command
prtl set <path> -> Sets the given path (relative or full) as your default prtl
prtl set <path> -t <tag> -> 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 <tag>) -> Take the prtl to a tagged prtl
With shorthand configured
p get is short for cd $(prtl get)p get <tag> is short for cd $(prtl get <tag>)p set <path> is short for prtl set <path>p set <path> -t <tag> is short for prtl set <path> -t <tag>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!