Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A CLI tool to manage and navigate directories quickly.

License

NotificationsYou must be signed in to change notification settings

ChetanXpro/jumb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How many times do you run thecd command in a day? If you're like many developers, it's probably more than you'd like to count.

Friendship ended with X, now Y is my best friend

Jumb is a command-line tool that simplifies directory navigation by allowing users to create shortcuts for frequently accessed directories. This reduces the need for lengthycd commands, saving time and streamlining workflow.

Key Benefits

  • Reducecd Usage: Minimize the need to use lengthycd commands by setting up shortcuts to your most used directories.
  • Save Time: Dramatically reduce the time spent navigating between different parts of your file system, enhancing productivity, especially for developers and system administrators.
  • Streamline Workflow: Improve your workflow efficiency by quickly switching contexts between projects and directories.

Prerequisites

Before installing Jumb, ensure you have the following installed on your system:

  • Git: Required to clone the repository if not installing via Cargo.
  • Rust and Cargo: Jumb is built with Rust, so you'll need Rust and Cargo installed to compile and install it directly from the source or via Cargo. Install them fromthe official Rust site.

Installation

Using Cargo

Install Jumb directly from Cargo:

cargo install jumb

NOTE: After installing Jumb with Cargo, it's essential to wrap it with a shell script to make the tool work properly.

Setting Up the Shell Wrapper

Integrate Jumb with your shell by adding a shell wrapper to your .zshrc or .bashrc file. This wrapper ensures that using Jumb feels like a natural extension of your shell commands.

# Jumb tool wrapperfunctionjnav() {unalias jumb2>/dev/nullunset -f jumb2>/dev/null# Find the path to the 'jumb' executable dynamicallylocal jumb_path=$(which jumb)if [[-z"$jumb_path" ]];thenecho"The 'jumb' command is not installed or not in PATH."return 1# Exit the function with an error statusfi# Check if the command is 'view' without additional argumentsif [["$1"=="view" ]]&& [[$#-eq 1 ]];then# This should only list the directories, not change to any directory$jumb_path viewelif [[$#-eq 1 ]];then# Assuming any single argument not prefixed by 'view' is a path namelocal dir=$($jumb_path"$1")if [[-d"$dir" ]];thencd"$dir"elseecho"Directory not found:$dir"fielse# Handle other commands or multiple arguments normally$jumb_path"$@"fi}

Why Usejnav Instead ofjumb?

Thejnav function is used instead of directly invoking jumb to avoid any potential conflicts with the binary name. This function ensures that the shell correctly handles the custom functionality provided by Jumb, such as managing and navigating to directory shortcuts.

Customizing Function Name

If you prefer a different name for the function, replace jnav with your chosen name to prevent potential conflicts with the Jumb binary.

Usage

Set up and manage your directory shortcuts easily:

  • Add a Shortcut
jnav add shortcut_name absolute/path/to/directory

For example, if you want to add the current directory path, then you can run the command with a full stop to add the current dir.

jnav add project.
  • Navigate quickly using:
jnav shortcut_name
  • Remove a Shortcut
jnav remove shortcut_name
  • View All Shortcuts
jnav view
  • View particular shortcut path
jnav view<Shortcut_name>

Contributing

Contributions are encouraged. Feel free to fork the project and submit pull requests.

About

A CLI tool to manage and navigate directories quickly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp