toor

Crates.iotoor
lib.rstoor
version
sourcesrc
created_at2023-11-30 05:55:48.790472
updated_at2024-12-12 22:35:00.789033
descriptionFind project root
homepage
repositoryhttps://github.com/azzamsa/toor
max_upload_size
id1053890
Cargo.toml error:TOML parse error at line 20, column 1 | 20 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Azzam S.A (azzamsa)

documentation

README

Toor

Find project root.

Build status Sponsor me


Say goodbye to the tedious dance of cd ..; cd..; cd.. (10x) or convoluted aliases like .., ...., ......... Embrace simplicity with just one command -- introducing toor. Bind it to your favorite shell, and voila! A single r keystroke transports you straight to the root directory. Effortlessly elevate your command line experience with a touch of magic.

Features

  • Fancy error message and colorful output.
  • Cross-platform and single binary.

Usage

🦄 toor --help

rust on master is 📦 v0.1.0 via 🦀 v1.74.0
🦄 toor
/home/user/playground/rust

~/playground
🦄 toor
Error: toor::no_project_root (link)

  × Project root is not found.
  help: Make sure the project root exists.

Integration With Other Tools

Fish Shell

#
# toor
function r # root
    set project_root (toor 2>/dev/null)

    if test -n "$project_root"
        # If successful, change to the project root directory
        cd "$project_root"
        echo "Changed to project root: $project_root"
    else
        # If not successful, stay in current directory
        echo "Project root not found. I dont' go anywhere 📍"
    end
end

Installation

From Binaries

The release page includes pre-compiled binaries for GNU/Linux, macOS, and Windows.

From Source

Using cargo-binstall

$ cargo binstall toor

Using Rust's package manager cargo:

$ cargo install toor

Development

git clone https://github.com/azzamsa/toor

# Build
cd toor
cargo build

# Run unit tests and integration tests
cargo test

# Install
cargo install --path .

Contributing

To learn more read the development guide

Origin of The Name

The term "toor" is a whimsical variation of "root".

Credits

Commit count: 28

cargo fmt