Giter VIP home page Giter VIP logo

hyperjump's Introduction

About HyperJump

HyperJump - simple and quick bookmark tool for bash and zsh shells. I found similar projects, but nothing that was both fast, easy to use, and simple enough. I really needed a location bookmarking app because I am working on a high latency connection, and switching between directories is a pain. It's also a nice memory aid. I installed it on all of the servers I manage, and now I can run something like jj httpd and jump to the right config directory for the web server on that machine, regardless of the operating system it's running. So it's basically a tool to reduce your cognitive load.

How To Use

HyperJump consists of 3 command line commands (functions).

  • jr - Jump Remember. Bookmarks current directory. Run jr nickname to add current directory, or just run jr and use the interactive mode.
  • jf - Jump Forget. Deletes the current directory from the bookmarks. Run jf while in a directory you want forgotten or jf nickname to forget a specific nickname.
  • jj - Jump Jump. Jumps to a bookmark location. Run jj nickname to jump to a location or just jj to get a list of all bookmarks. You can also run jj nickname command to jump to a location and than run the command specified with "./" as the first argument. So, for instance, you can run jj myProject open subl on OSX to jump to the myProject directory and open the myProject directory in Finder and Sublime Text.
  • jp - Jump Push. Jumps to a bookmark location and saves that location to the directory stack. Usage is like jj but uses pushd instead of cd.
  • hjsort - Sort the hyperjump list (Note that running a "jr" will also sort the list)

All of the commands have autocomplete. jj, jp, and jf will autocomplete with nicknames of bookmarked locations. The jr command will autocomplete with the basename of the current directory. After the first argument, jj and jp will autocomplete with list of available system commands (programs).

Examples:

# Remember current directory
$ jr
$ jr MyDir

# Forget current directory
$ jf

# Forget another directory
$ jf AnotherDir

# Jump to a directory
$ jj
$ jj MyDir

# Jump to a directory and push to dirs
$ jp
$ jp MyDir
 
# Jump to a directory and open the directory in another program(s)
$ jj MyDir open
$ jj MyDir open subl tm 
$ jp MyDir open

# Sort the list of bookmarks (not normally necessary as running jr sorts the list)
$ hjsort

How To Install

Download hyperjump bash script and place it somewhere on your system, such as ~/bin/hyperjump. Add the following line to your .profile, .bashrc or .zshrc file:

source /location/of/hyperjump

Optional: To get the list of all the Bookmarks in a nice looking menu window, you need a unix utility called dialog. You can install it via yum, apt-get, homebrew, ports, and others like so:

sudo yum install dialog
sudo apt-get install dialog
brew install dialog
sudo port install dialog

Final Notes

Released under the MIT License. Use it, love it, fork it, make changes, send pull requests. Enjoy!

hyperjump's People

Contributors

alanhoyle avatar davefnbuck avatar kyrias avatar x0054 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.