Skip to content

Commit

Permalink
Added tips to the Additional Configuration section in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jsliang committed Feb 1, 2013
1 parent 4ce2cb5 commit c16b305
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Grab a copy of autojump:
Run the installation script:

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

and follow on screen instructions.

Expand Down Expand Up @@ -193,6 +193,21 @@ ADDITIONAL CONFIGURATION

Changes require reloading autojump to take into effect.

- Use a File Manager to Open Jumped-to Directories

You can modify your \~/.bashrc or \~/.zsh to make autojump open a
directory for you. Add the following lines in your \~/.bashrc or
\~/.zshrc:

function jo { xdg-open $(autojump $@); }
complete -F _autojump jo

If you're using Mac OS X, you can replace `xdg-open` with `open`.

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.

ADVANCED USAGE
--------------

Expand Down
22 changes: 22 additions & 0 deletions docs/autojump.1
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,28 @@ export\ AUTOJUMP_AUTOCOMPLETE_CMDS=\[aq]cp\ vim\[aq]
.PP
Changes require reloading autojump to take into effect.
.RE
.IP \[bu] 2
Use a File Manager to Open Jumped-to Directories
.RS 2
.PP
You can modify your ~/.bashrc or ~/.zsh to make autojump open a
directory for you.
Add the following lines in your ~/.bashrc or ~/.zshrc:
.IP
.nf
\f[C]
function\ jo\ {\ xdg-open\ $(autojump\ $\@);\ }
complete\ -F\ _autojump\ jo
\f[]
.fi
.PP
If you\[aq]re using Mac OS X, you can replace \f[C]xdg-open\f[] with
\f[C]open\f[].
.PP
After executing \f[C]source\ ~/.bashrc\f[] or \f[C]source\ ~/.zshrc\f[],
you can try \f[C]jo\ foo\f[], which behaves like \f[C]j\ foo\f[] except
that it opens the \f[C]foo\f[] directory with a file manager.
.RE
.SS ADVANCED USAGE
.IP \[bu] 2
Using Multiple Arguments
Expand Down
11 changes: 11 additions & 0 deletions docs/body.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.

Changes require reloading autojump to take into effect.

- Use a File Manager to Open Jumped-to Directories

You can modify your ~/.bashrc or ~/.zsh to make autojump open a directory for you. Add the following lines in your ~/.bashrc or ~/.zshrc:

function jo { xdg-open $(autojump $@); }
complete -F _autojump jo

If you're using Mac OS X, you can replace `xdg-open` with `open`.

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.

## ADVANCED USAGE

- Using Multiple Arguments
Expand Down

0 comments on commit c16b305

Please sign in to comment.