@ -10,93 +10,98 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.
--version show version information and exit
## INTERNAL OPTIONS
ADVANCED USAGE
--------------
-b, --bash enclose directory with quotes to prevent errors
- Using Multiple Arguments
--complete used for tab completion
Let's assume the following database:
## ADDITIONAL CONFIGURATION
30 /home/user/mail/inbox
10 /home/user/work/inbox
- Enable ZSH Tab Completion
`j in` would jump into /home/user/mail/inbox as the higher weighted
entry. However you can pass multiple arguments to autojump to prefer
a different entry. In the above example, `j w in` would then jump
you into /home/user/work/inbox.
ZSH tab completion requires the `compinit` module to be loaded. Please add
the following line to your ~/.zshrc:
- Jump to a Child Directory.
autoload -U compinit; compinit
Sometimes it's convenient to jump to a child directory (sub-directory of
current directory) rather than typing out the full name.
- Always Ignore Case
jc images
Default behavior is to prioritize exact matches over all else. For example,
`j foo` will prefer /foobar over /FooBar even if the latter has a higher
weight. To change this behavior and ignore case, add the following
environmental variable in your ~/.bashrc:
- Open File Manager To Directories (instead of jumping)
export AUTOJUMP_IGNORE_CASE=1
Instead of jumping to a directory, you can open a file explorer window (Mac
Finder, Windows Explorer, GNOME Nautilus, etc) to the directory instead.
- Prevent Database Entries' Decay
jo music
Default behavior is to decay unused database entries slowly over time.
Eventually when database limits are hit and maintenance is run, autojump
will purge older less used entries. To prevent decay, add the following
variable in your ~/.bashrc:
Opening a file manager to a child directory is also supported.
export AUTOJUMP_KEEP_ALL_ENTRIES=1
jco images
- Prefer Symbolic Links
- ZSH Tab Completion
Default behavior is to evaluate symbolic links into full paths as to reduce
duplicate entries in the database. However, some users prefer a shorter
working directory path in their shell prompt. To switch behavior to prefer
symbolic links, add the following environmental variable in your ~/.bashrc:
Tab completion requires two tabs before autojump will display the
completion menu. However if `setopt nolistambiguous` is enabled,
then only one tab is required.
export AUTOJUMP_KEEP_SYMLINKS=1
ADDITIONAL CONFIGURATION
------------------------
- Autocomplete Additional Commands (Bash only)
- Enable ZSH Tab Completion
Autojump can be used to autocomplete other commands (e.g. cp or vim). To use
this feature, add the following environmental variable in your ~/.bashrc:
ZSH tab completion requires the `compinit` module to be loaded.
Please add the following line to your \~/.zshrc:
export AUTOJUMP_AUTOCOMPLETE_CMDS='cp vim'
autoload -U compinit; compinit
Changes require reloading autojump to take into effect.
- Always Ignore Case
- Use a File Manager to Open Jumped-to Directories
Default behavior is to prioritize exact matches over all else. For
example, `j foo` will prefer /foobar over /FooBar even if the latter
has a higher weight. To change this behavior and ignore case, add
the following environmental variable in your \~/.bashrc:
You can modify your ~/.bashrc or ~/.zsh to make autojump open a directory for you. Add the following lines in your ~/.bashrc or ~/.zshrc:
export AUTOJUMP_IGNORE_CASE=1
function jo { xdg-open $(autojump $@); }
complete -F _autojump jo
- Prevent Database Entries' Decay
If you're using Mac OS X, you can replace `xdg-open` with `open`.
Default behavior is to decay unused database entries slowly over
time. Eventually when database limits are hit and maintenance is
run, autojump will purge older less used entries. To prevent decay,
add the following variable in your \~/.bashrc:
After executing `source ~/.bashrc` or `source ~/.zshrc`, you can try `jo foo`, which behaves like `j foo` except that it opens the `foo` directory with a file manager.
export AUTOJUMP_KEEP_ALL_ENTRIES=1
## ADVANCED USAGE
- Prefer Symbolic Links
- Using Multiple Arguments
Default behavior is to evaluate symbolic links into full paths as to
reduce duplicate entries in the database. However, some users prefer
a shorter working directory path in their shell prompt. To switch
behavior to prefer symbolic links, add the following environmental
variable in your \~/.bashrc:
Let's assume the following database:
export AUTOJUMP_KEEP_SYMLINKS=1
30 /home/user/mail/inbox
10 /home/user/work/inbox
- Autocomplete Additional Commands (Bash only)
`j in` would jump into /home/user/mail/inbox as the higher weighted entry.
However you can pass multiple arguments to autojump to prefer a different
entry. In the above example, `j w in` would then jump you into
/home/user/work/inbox.
Autojump can be used to autocomplete other commands (e.g. cp or
vim). To use this feature, add the following environmental variable
in your \~/.bashrc:
- ZSH Tab Completion
export AUTOJUMP_AUTOCOMPLETE_CMDS='cp vim'
Tab completion requires two tabs before autojump will display the completion
menu. However if `setopt nolistambiguous` is enabled, then only one tab is
required.
Changes require reloading autojump to take into effect.
- Change Directory Weight
- Change Directory Weight
To manually change a directory's key weight, you can edit the file
_$XDG_DATA_HOME/autojump/autojump.txt_. Each entry has two columns. The
first is the key weight and the second is the path:
*$XDG\_DATA\_HOME/autojump/autojump.txt*. Each entry has two
columns. The first is the key weight and the second is the path: