leaper

Crates.ioleaper
lib.rsleaper
version0.3.1
sourcesrc
created_at2024-05-30 16:20:36.690009
updated_at2024-06-02 18:15:38.781761
descriptionA simple CLI tool to quickly leap to a directory
homepage
repositoryhttps://github.com/mlueckl/leaper
max_upload_size
id1257033
size11,958
Michael Lueckl (mlueckl)

documentation

README

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

  1. Run cargo install leaper
  2. 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
}
Commit count: 34

cargo fmt