• Stars
    star
    142
  • Rank 253,147 (Top 6 %)
  • Language
    Ruby
  • License
    GNU General Publi...
  • Created almost 14 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a bookmarking system for the bash shell

Jump, a bookmarking system for the bash and zsh shells.¶ ↑

Introduction¶ ↑

Jump is a tool that allows you to quickly change directories in the bash and zsh shells using bookmarks. Thanks to Jump, you won’t have to type those long paths anymore. Jump was inspired by go-tool by ActiveState.

Usage¶ ↑

Say you often work in a directory with a path like ‘/Users/giuseppe/Work/Projects/MyProject`. With Jump you can add a bookmark to it:

$ jump --add myproject

From now on you can jump to your project just by typing:

$ jump myproject

You can even append subfolders to the bookmark name!

$ jump myproject/src/

You can take a look at all your bookmarks with the ‘list` command:

$ jump --list

To delete a bookmark you don’t need anymore, use the ‘del` command:

$ jump --del myproject

To show the path to a bookmark, use the ‘path` command:

$ jump --path myproject

Don’t remember a command? Just type:

$ jump --help

Advanced completion¶ ↑

Suppose you added a bookmark called rails-app pointing to /home/flavio/test/test_app. The folder contains the following files:

drwxr-xr-x 6 flavio users  4096 2010-08-10 10:38 app
drwxr-xr-x 5 flavio users  4096 2010-08-10 10:38 config
drwxr-xr-x 2 flavio users  4096 2010-08-10 10:38 db
drwxr-xr-x 2 flavio users  4096 2010-08-10 10:38 doc
drwxr-xr-x 3 flavio users  4096 2010-08-10 10:38 lib
drwxr-xr-x 2 flavio users  4096 2010-08-10 10:38 log
drwxr-xr-x 5 flavio users  4096 2010-08-10 10:38 public
-rw-r--r-- 1 flavio users   307 2010-08-10 10:38 Rakefile
-rw-r--r-- 1 flavio users 10011 2010-08-10 10:38 README
drwxr-xr-x 3 flavio users  4096 2010-08-10 10:38 script
drwxr-xr-x 7 flavio users  4096 2010-08-10 10:38 test
drwxr-xr-x 6 flavio users  4096 2010-08-10 10:38 tmp
drwxr-xr-x 3 flavio users  4096 2010-08-10 10:38 vendor

The following completions are available:

$ jump ra[TAB]

is expanded to:

$ jump rails-app

While

$ jump rails-app/[TAB]

allows to choose between the following completions:

rails-app/        rails-app/config  rails-app/doc     rails-app/log     rails-app/script  rails-app/tmp
rails-app/app     rails-app/db      rails-app/lib     rails-app/public  rails-app/test    rails-app/vendor

Typing

$ jump rails-app/l[TAB]

suggests the following completions:

rails-app/lib  rails-app/log

Hence

$ jump rails-app/lo[TAB]

is automatically expanded to

$ rails-app/log

jump also allows users to print out the path of a bookmark. This adds a flavor of new commands in conjunction to jump. For example, jump allows a user to execute the following commands:

$ ls `jump -p rails-app`
$ cp `jump -p rails-app/Rakefile` .
$ vim `jump -p rails-app/README`

The advanced completion works out of the box for zsh users. The bash shell relies on bash_completion.

Installation¶ ↑

Jump is packaged as a gem:

$ gem install jump

Notes for Debian & Ubuntu users¶ ↑

The rubygem package shipped with Debian & Ubuntu acts in a different way. Once jump has been installed you have to updated your PATH (unless you have already done it).

Execute the following command:

$ gem environment

and take a look at the GEM PATHS section.

You will have something like that:

- GEM PATHS:
  - /var/lib/gems/1.8

In this case /var/lib/gems/1.8 is your GEM PATH. Add GEM PATH/bin to your PATH.

Later versions of Debian/Ubuntu don’t have a bin/ directory under the gems directory, so you should add the explicit jump gem directory to your path, ie:

/var/lib/gems/2.3.0/gems/jump-0.4.1/bin

Additonally you’ll want to run the following within the bin/ directory so you can run jump instead of jump-bin

$ cp jump-bin jump

Bash integration¶ ↑

Using bash-completion (recommended)¶ ↑

It’s strongly recommended to install bash_completion. In this way you will have the best user experience.

Linux users can install it using their package manager (apt, zypper, yum, emerge…) while OSX users can install it via ports, fink or brew.

Execute the following command once jump has been installed:

sudo cp `jump-bin --bash-integration`/bash_completion/jump /path_to/bash_completion.d

The bash_completion.d directory is usually located under /etc/. OSX users will find this directory under fink/port/brew installation directory (e.g. /opt/local/etc).

Note for Ubuntu users: the gem contents jump command won’t show the absolute installation path.

All the files shipped with jump can be found under the following path:

[GEM PATH]/gems/jump-[JUMP VERSION]/

Take a look at the previous section in order to figure out your GEM PATH.

Without bash-completion¶ ↑

If you do not want to install bash_completion then add the following code to your bash configuration file (e.g. ~/.bash_profile or ~/.bashrc’:

source `jump-bin --bash-integration`/shell_driver

Beware: without bash_completion you won’t be able use jump’s advanced completion features.

Zsh integration¶ ↑

After having installed jump, add the following code to your .zshrc file:

source `jump-bin --zsh-integration`

© 2010 Flavio Castelli and Giuseppe Capizzi

More Repositories

1

qjson

QJson is a qt-based library that maps JSON data to QVariant objects.
C++
278
star
2

kuberlr

A tool that simplifies the management of multiple versions of kubectl
Go
98
star
3

kube-image-bouncer

Simple endpoint for the ImagePolicyWebhook and the GenericAdmissionWebhook Kubernetes admission controllers
Go
77
star
4

hermit-wasm

A Unikernel running WebAssembly code
Rust
45
star
5

collage

read-only docker registry made of images coming from different locations
Go
23
star
6

krew-wasm

krew-wasm offers a way to write and distribute kubectl plugins based on WebAssembly
Rust
14
star
7

plexamp-flatpak

A flatpak for the official Plexamp app
Makefile
11
star
8

kaveau

Easy to use and fully integrated backup solution for KDE
C++
9
star
9

salt-kubernetes-demo

Demo of kubernetes-salt integration
Python
9
star
10

wapc-guest-dotnet

A waPC guest for .NET
C#
9
star
11

fresh-container

fresh-container brings semantic versioning checks to the world of containers
Go
7
star
12

obs2vagrant

Turn Open Build Service into a simple Vagrant catalog
Go
7
star
13

docker-orchestration-demo

Demo environment created with Vagrant and openSUSE to test Docker orchestration tools.
SaltStack
6
star
14

rockmarble

rockmarble is a MeeGo app that allows you to find good live music. You can either follow your favourite artists or find new ones.
C++
6
star
15

scsgate

A python module to interact with the SCSGate device
Python
5
star
16

kubectl-decoder

A kubectl pluging that decodes Kubernetes Secrets - done with WebAssembly and WASI
Rust
4
star
17

dotfiles

Repo containing all my dot files
Vim Script
3
star
18

kubectl-kubewarden

An experimental kubectl plugin for kubewarden
Rust
3
star
19

guestbook-go

Simple guestbook built using Go and Vue.js
Go
3
star
20

k3s-aws-sles

A simple terraform deployment to create a k3s infrastructure on AWS, using SUSE SLE as OS
HCL
2
star
21

cel-evaluator-poc

A POC that uses Common Expression Language (CEL) constraints to validate free-form JSON input
C++
2
star
22

organization-operator

A kubernetes operator that manages Organization and Space CR. Useful to partition a single kubernetes cluster
Go
2
star
23

xesamclient

Qt library for accessing Xesam services
C++
2
star
24

kubecon-eu-2022-demo

Demo for https://sched.co/ytoY
Go
2
star
25

opensuse-lx-zone

Experimental lx branded zone for openSUSE 42.2 Leap
Shell
2
star
26

kcd-italy-demo

Demo for Kubernetes Comminity Day Italy 2021
Go
1
star
27

tinygo-wasi-symbol-bug

This repository contains the code required to reproduce a tinygo linker issue
Go
1
star
28

policy-secure-pod-images

Container image verification
Rust
1
star
29

Delegator

A simple rails app that gives you infinite openid identities
Ruby
1
star
30

hpcalc

HpCalc is an open-source multi-platform editor for the Hp 39G calculator.
C++
1
star
31

sinatra-coffee-script-template

Ruby
1
star
32

gentoo_doc_checker

Gentoo Documentation Checker
Perl
1
star
33

krew-wasm-plugin-sdk-rust

krew-wask plugin Rust SDK
Rust
1
star
34

dister

Heroku like solution for SUSE Studio
1
star
35

fast_user_switch

A KDE plasmoid that allows to switch between user sessions.
C++
1
star
36

suse_loves_docker_demo

A simple webapp used during Docker demos at SUSE
Go
1
star
37

active_resource_test_helper

Makes ActiveResource testing easier.
Ruby
1
star
38

rancher-project-info-propagator

A controller that propagates Rancher Projet labels to its children Namespace objects
Rust
1
star