Crates.io | leaper |
lib.rs | leaper |
version | 0.3.1 |
source | src |
created_at | 2024-05-30 16:20:36.690009 |
updated_at | 2024-06-02 18:15:38.781761 |
description | A simple CLI tool to quickly leap to a directory |
homepage | |
repository | https://github.com/mlueckl/leaper |
max_upload_size | |
id | 1257033 |
size | 11,958 |
A simple CLI tool to quickly leap to a directory.
You are home, switch to debug or to cathat.png's directory
.
└── home/
├── dev/
│ └── ...
│ └── ...
└── etc/
├── misc/
│ └── even_more_files/
│ └── cathat.png
└── more/
└── test/
├── debug
└── ...
$ leaper debug
$ leaper cathat.png
$ leaper --help
cargo install leaper
leap() {
# Call tool and forward all args
local dir_path=$(leaper "$@")
# Check if a path was returned
if ["$dir_path"]; then
# 'cd' to the directory
cd "$dir_path"
else
echo "'$1' not found"
fi
}