github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

joelthelion / autojump

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 423
    • 34
  • Source
  • Commits
  • Network (34)
  • Issues (2)
  • Downloads (17)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (6)
    • 2d4e3c8a6cd4d85b57e7c10ac0320e9014d0e265
    • 790b52d31e187d473a8a431ac4b635e5ccb9216d
    • completion
    • daemon
    • dev
    • master ✓
  • Switch Tags (12)
    • release-v12
    • release-v11
    • release-v10
    • release-v9
    • release-v8
    • release-v7
    • release-v6
    • release-v5
    • release-v4
    • release-v3
    • release-v2
    • arch-v1
  • Branch List
Sending Request…

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

  Cancel

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

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

tell the user he needs to source his *rc before he can start using autojump 
Joël Schaerer (author)
Tue Aug 31 06:40:32 -0700 2010
commit  de9270bb9908beacecb2
tree    d69b857521ca2eb513ad
parent  6b9880dc47131b95d25c
autojump /
name age
history
message
file .gitignore Sun Apr 25 14:38:43 -0700 2010 git ignore [joelthelion]
file COPYING Wed May 13 02:32:19 -0700 2009 license stuff [Joël Schaerer]
file README.rst Tue Aug 31 06:30:11 -0700 2010 chain commands in the prompt_command with ; rat... [Joël Schaerer]
file _j Tue Apr 27 05:16:08 -0700 2010 fix completion for zsh (thanks simon!) [joelthelion]
file autojump Tue Aug 03 06:09:09 -0700 2010 while the db should stay of a reasonable size, ... [Joël Schaerer]
file autojump.1 Tue Aug 31 06:30:11 -0700 2010 chain commands in the prompt_command with ; rat... [Joël Schaerer]
file autojump.bash Tue Aug 31 06:30:11 -0700 2010 chain commands in the prompt_command with ; rat... [Joël Schaerer]
file autojump.sh Wed May 13 02:32:19 -0700 2009 license stuff [Joël Schaerer]
file autojump.zsh Wed Aug 18 09:05:30 -0700 2010 Avoid 'scalar parameter data_dir created global... [nicoulaj]
file icon.png Fri Mar 27 03:46:21 -0700 2009 path specific action + decorator [Pierre Gueth]
file install.sh Tue Aug 31 06:40:32 -0700 2010 tell the user he needs to source his *rc before... [Joël Schaerer]
file install.zsh Tue Aug 31 06:40:32 -0700 2010 tell the user he needs to source his *rc before... [Joël Schaerer]
file jumpapplet Thu May 14 12:43:04 -0700 2009 nice gui ;) [georges.wbushjr@laposte.net]
file make_release.sh Wed Aug 25 02:49:33 -0700 2010 small script to make releases with git [Joël Schaerer]
README.rst

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.

jumpstat

will print out something in 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/>.

Installation

Auto Installation

run:

./install.sh

or:

./install.zsh

depending on your shell. Enter your root password if it asks.

Add the line:

source /etc/profile

to ~/.bashrc or ~/.zshrc if it isn't already there.

Troubleshoot

If the script fails, you may need to do:

chmod +x install.(z)sh

before the first step.

Manual installation of autojump is very simple: copy

  • autojump to /usr/bin,
  • autojump.sh to /etc/profile.d,
  • autojump.1 to /usr/share/man/man1.

Make sure to source /etc/profile in your .bashrc or .zshrc

source /etc/profile

Packaging

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

pacman -S autojump

I would be very interested by packages for other distros. If you think you can help me with the packaging, please contact me!

Uninstallation

To completely remove autojump you should remove these files:

/etc/profile.d/autojump.bash

/etc/profile.d/autojump.sh

/etc/profile.d/autojump.zsh

/usr/bin/autojump

/usr/bin/jumpapplet

/usr/share/autojump/icon.png

/usr/share/autojump/

/usr/share/man/man1/autojump.1

Remove any mention of autojump in your .bashrc or .zshrc, then in currently running shells do:source /etc/profile.

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

Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文