GithubHelp home page GithubHelp logo

helocy / autojump Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shelhamer/autojump

0.0 1.0 0.0 334 KB

A cd command that learns - easily navigate directories from the command line

Home Page: http://wiki.github.com/joelthelion/autojump/

License: GNU General Public License v3.0

Python 58.57% Roff 6.81% Shell 34.62%

autojump's Introduction

AUTOJUMP

A cd command that learns

One of the most used shell commands is cd. A quick survey among my friends revealed that between 10 and 20% of all commands they type are actually cd commands! Unfortunately, jumping from one part of your system to another with cd requires to enter almost the full path, which isn't very practical and requires a lot of keystrokes.

autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line. The jumpstat command shows you the current contents of the database. You need to work a little bit before the database becomes usable. Once your database is reasonably complete, you can "jump" to a commonly "cd"ed directory by typing:

j dirspec

where dirspec is a few characters of the directory you want to jump to. It will jump to the most used directory whose name matches the pattern given in dirspec. Note that autojump isn't meant to be a drop-in replacement for cd, but rather a complement. Cd is fine when staying in the same area of the filesystem; autojump is there to help when you need to jump far away from your current location.

Autojump supports tab completion. Try it! Autojump should be compatible with bash 4. Please report any problems!

Pierre Gueth contributed a very nice applet for freedesktop desktops (Gnome/KDE/...). It is called "jumpapplet", try it!

Thanks to Simon Marache-Francisco's outstanding work, autojump now works perfectly with zsh.

Examples

j mp3

could jump to /home/gwb/my mp3 collection, if that is the directory in which you keep your mp3s.

autojump mp3

prints out something like ``/home/gwb/mymp3collection'', but does not jump to that directory.

jumpstat

will print out something along the lines of:

...
54.5:  /home/shared/musique
60.0:  /home/joel/workspace/coolstuff/glandu
83.0:  /home/joel/workspace/abs_user/autojump
96.9:  /home/joel/workspace/autojump
141.8: /home/joel/workspace/vv
161.7: /home/joel
Total key weight: 1077

The "key weight" reflects the amount of time you spend in a directory.

Author

Joel Schaerer (joel.schaerer (at) laposte.net) Autojump applet written by Pierre Gueth Zsh support: Simon Marache-Francisco Install script written by Daniel Jackoway and others.

License

autojump is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

autojump is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with autojump. If not, see <http://www.gnu.org/licenses/>.

Requirements

Python v2.6+ or 3.0+

Installation

Auto Installation

run:

./install.sh [ --local ] [ --zsh ]

and follow on screen instructions.

Use --local to install into current user's home directory.

Use --zsh to install for Z shell.

Troubleshoot

If the script fails, you may need to do:

chmod +x install.sh

before the first step.

Packaging

For now gcarrier and I have packaged autojump for Arch Linux. It is available in [community]. To install, type:

pacman -S autojump

Autojump is now officially a part of Debian Sid, thanks to Tanguy Ortolo’s work (for policy reasons, it requires manual activation after installing, see /usr/share/doc/autojump/README.Debian). To install, type:

apt-get install autojump

Autojump is also available on the OSX Homebrew package manager:

brew install autojump

Autojump is also packaged for a number of other distros. Check the wiki for an up-to-date list! I would be very interested by packages for other distros. If you think you can help with the packaging, please contact me!

Uninstallation

run:

./uninstall.sh

and follow on screen instructions.

If you keep getting autojump: command not found at the Bash prompt, do:unset PROMPT_COMMAND. You can also restart your shell.

autojump's People

Contributors

wting avatar joelthelion avatar elcerdo avatar xiaonaitong avatar statik213 avatar palfrey avatar liyanchang avatar sudish avatar anl avatar chbrown avatar vad avatar shelhamer avatar nicoulaj avatar ciudilo avatar mschout avatar int3 avatar

Watchers

ZhiChao Yu 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.