1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00
Go to file
Liyan Chang 2ed86b3a5e More intelligently modify users .bashrc and .bash_profile
install.sh:
1. for those who have a /etc/profile.d
   then grep .bashrc for the sourcing of the autocomplete code
2. for those who use OSX
   grep .bash_profile to make sure .bashrc is sourced.
2010-07-11 16:39:41 -04:00
_j fix completion for zsh (thanks simon!) 2010-04-27 14:16:08 +02:00
.gitignore git ignore 2010-04-25 23:38:43 +02:00
autojump make the completion separator configurable 2010-07-07 23:55:32 +02:00
autojump.1 license stuff 2009-05-13 11:32:19 +02:00
autojump.bash completion now works with multiple patterns!!! 2010-04-27 10:08:07 +02:00
autojump.sh license stuff 2009-05-13 11:32:19 +02:00
autojump.zsh really silent this time in case of write error in user directory 2010-01-20 17:47:52 +01:00
COPYING license stuff 2009-05-13 11:32:19 +02:00
icon.png path specific action + decorator 2009-03-27 11:46:21 +01:00
install.sh More intelligently modify users .bashrc and .bash_profile 2010-07-11 16:39:41 -04:00
install.zsh Making the zsh script in line with sh 2010-06-22 17:55:19 +08:00
jumpapplet nice gui ;) 2009-05-14 21:43:04 +02:00
README.rst typo in documentation 2010-06-22 17:55:32 +08:00

========
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. Autojump will listen and rank your 'cd' commands by frequency. 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.

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``

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.