8 releases
0.3.1 | Jun 2, 2024 |
---|---|
0.3.0 | Jun 2, 2024 |
0.2.2 | Jun 1, 2024 |
0.2.1 | May 31, 2024 |
0.1.3 | May 30, 2024 |
#1284 in Command line utilities
7KB
115 lines
Leaper
A simple CLI tool to quickly leap to a directory.
Usage
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
Setup
- Run
cargo install leaper
- Create shell action
Zsh example
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
}
Dependencies
~1MB
~15K SLoC