Skip to content
Proyek

Tentang

Jump membantu Anda menavigasi lebih cepat dengan mempelajari kebiasaan Anda. ✌️

Alat pengembangan

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
-1
dalam 1 bulan
0

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Jump

Jump

Jump integrates with your shell and learns where you go.
Type a few letters and land in the right directory.

Latest release MIT License

Installation · Shell integration · Usage · Releases

Jump demo

Installation

Platform Command
macOS brew install jump or port install jump
Linux sudo snap install jump
Nix nix-env -iA nixpkgs.jump
Go go install github.com/gsamokovarov/jump@latest
Linux distribution packages
Distribution Command
Arch sudo yay -S jump
Ubuntu / Debian wget https://github.com/gsamokovarov/jump/releases/download/v0.69.0/jump_0.69.0_amd64.deb && sudo dpkg -i jump_0.69.0_amd64.deb
Fedora wget https://github.com/gsamokovarov/jump/releases/download/v0.69.0/jump-0.69.0-1.x86_64.rpm && sudo rpm -i jump-0.69.0-1.x86_64.rpm
Void xbps-install -S jump

Or install the latest release for the current user into ~/.local/bin:

curl -fsSL https://raw.githubusercontent.com/gsamokovarov/jump/main/install.sh | bash

Shell integration

Jump is used through its helper function, j by default. Add the line for your shell to its config:

bash / zsh in ~/.bashrc or ~/.zshrc

eval "$(jump shell)"

fish in ~/.config/fish/config.fish

jump shell fish | source

PowerShell in your $PROFILE

Invoke-Expression (&jump shell pwsh | Out-String)

Nushell

jump shell nushell | save --append $nu.config-path

Murex

murex-package install https://github.com/lmorg/murex-module-jump.git

That's it. Jump starts learning as soon as you cd around.

Custom binding

The letter j is the default binding. If that's not your jam, bind it to anything you like:

eval "$(jump shell --bind=z)"
eval "$(jump shell --bind=goto)"

The new kids bind their jumpers straight to cd. Madness, I tell you. Jump can do it too:

eval "$(jump shell --bind=cd)"

Typing cd project now performs a fuzzy jump.

Usage

The j helper takes search terms and nothing else. Here is the whole of it:

j wc               # Fuzzy jump
j web-console      # Exact match
j ch site          # Deep jump
j dev/soc/web      # Deep jump, with slashes
j .                # Repo root
j . cable          # Based mode
j app/             # Relative jump
j -                # cd -
j ..               # cd ..
j ../..            # cd ../..
j                  # Reverse jump
j Dev              # Case-sensitive jump

The sections below explain each one with the directories it lands in.

Fuzzy jump

Jump fuzzy matches the name of the directory. Two to five characters are usually enough. Type the full name and Jump prefers the exact match.

j wc               # -> /Users/genadi/Development/rails/web-console
j console          # -> /Users/genadi/Development/rails/web-console
j b-c              # -> /Users/genadi/Development/rails/web-console
j web-console      # -> /Users/genadi/Development/rails/web-console

Deep jump

j ch site          # -> /Users/genadi/Development/chaos/website
j dev/soc/web      # -> /Users/genadi/Development/society/website

Spaces and slashes work interchangeably. Each part is matched against one path component, starting from the end: the last part against the directory name, the one before it against its parent and so on.

Based mode

For the one of you running a monorepo. Start a term with . and Jump searches only under the current base directory:

j . cable          # -> /Users/genadi/Development/rails/rails/actioncable
j . actionview/app # -> /Users/genadi/Development/rails/rails/actionview/app
j .                # -> /Users/genadi/Development/rails/rails

The base directory is the first one of:

  1. The $JUMP_BASED_PATH environment variable.
  2. The root of the current git repository.
  3. The current directory.

So j . works even outside git repositories.

Relative jump

If your term contains or ends with a slash, Jump first checks for a directory relative to where you are:

# In /Users/genadi/Development/rails/rails
j actioncable/     # -> ./actioncable
j actionpack/app   # -> ./actionpack/app

The familiar shell movements work too:

j -                # -> previous directory
j ..               # -> parent directory
j ../..            # -> grandparent directory

If the relative path does not exist, Jump falls back to fuzzy search.

Reverse jump

Landed in the wrong place? j without a term takes you to the next best match. Jump remembers the correction and ranks that directory higher.

j web              # -> /Users/genadi/Development/society/website
j                  # -> /Users/genadi/Development/chaos/website

Case-sensitive jump

A capital letter in the term makes the search case-sensitive:

j Dev              # -> /Users/genadi/Development

Pins

Pins are the last resort, for when Jump can't read your mind. Pin the current directory to a term and Jump always takes you there:

cd /Users/genadi/Development/rails
jump pin r

j r                # -> /Users/genadi/Development/rails

List and remove pins:

jump pins
jump unpin r

Database tools

jump clean         # remove the directories that no longer exist
jump forget        # forget the current directory
jump top           # list the directories by score
jump top --score   # list the directories with their scores
jump top dev       # list the directories that match a term

Importing from autojump, z or zoxide

Coming from another jumper? Jump ship:

jump import
jump import autojump
jump import z
jump import zoxide

Imports merge into your existing database without overwriting scores.

Why Jump?

Cause it's good!

License

Jump is released under the MIT License.

Jelajahi proyek terkait

Memuat…