mirror of
https://github.com/wting/autojump
synced 2025-06-10 19:34:11 +00:00
merging rc branch
This commit is contained in:
commit
1ab78ae91c
10
ChangeLog
10
ChangeLog
@ -49,7 +49,12 @@
|
|||||||
|
|
||||||
- ZSH tab completion fixed.
|
- ZSH tab completion fixed.
|
||||||
|
|
||||||
ZSH behavior now matches Bash behavior. To use type:
|
ZSH behavior now matches Bash behavior. However it requires the `compinit`
|
||||||
|
module to be loaded. Add the following line to ~/.zshrc:
|
||||||
|
|
||||||
|
autoload -U compinit; compinit
|
||||||
|
|
||||||
|
To use type:
|
||||||
|
|
||||||
j<space><tab><tab>
|
j<space><tab><tab>
|
||||||
|
|
||||||
@ -93,7 +98,8 @@
|
|||||||
entries. However users who prefer symlink paths can modify behavior with the
|
entries. However users who prefer symlink paths can modify behavior with the
|
||||||
above environmental variable.
|
above environmental variable.
|
||||||
|
|
||||||
- This ChangeLog added to better help package maintainers keep track of changes
|
- This ChangeLog added to better help package maintainers keep track of
|
||||||
|
changes
|
||||||
between releases.
|
between releases.
|
||||||
|
|
||||||
- Miscellaneous bug fixes.
|
- Miscellaneous bug fixes.
|
||||||
|
13
README.md
13
README.md
@ -145,6 +145,13 @@ INTERNAL OPTIONS
|
|||||||
ADDITIONAL CONFIGURATION
|
ADDITIONAL CONFIGURATION
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
- Enable ZSH Tab Completion
|
||||||
|
|
||||||
|
ZSH tab completion requires the `compinit` module to be loaded.
|
||||||
|
Please add the following line to your \~/.zshrc:
|
||||||
|
|
||||||
|
autoload -U compinit; compinit
|
||||||
|
|
||||||
- Always Ignore Case
|
- Always Ignore Case
|
||||||
|
|
||||||
Default behavior is to prioritize exact matches over all else. For
|
Default behavior is to prioritize exact matches over all else. For
|
||||||
@ -188,6 +195,12 @@ ADVANCED USAGE
|
|||||||
a different entry. In the above example, `j w in` would then jump
|
a different entry. In the above example, `j w in` would then jump
|
||||||
you into /home/user/work/inbox.
|
you into /home/user/work/inbox.
|
||||||
|
|
||||||
|
- ZSH Tab Completion
|
||||||
|
|
||||||
|
Tab completion requires two tabs before autojump will display the
|
||||||
|
completion menu. However if `setopt nolistambiguous` is enabled,
|
||||||
|
then only one tab is required.
|
||||||
|
|
||||||
- Change Directory Weight
|
- Change Directory Weight
|
||||||
|
|
||||||
To manually change a directory's key weight, you can edit the file
|
To manually change a directory's key weight, you can edit the file
|
||||||
|
@ -29,7 +29,7 @@ import shutil
|
|||||||
import sys
|
import sys
|
||||||
from tempfile import NamedTemporaryFile
|
from tempfile import NamedTemporaryFile
|
||||||
|
|
||||||
VERSION = 'release-v21-rc'
|
VERSION = 'release-v21-rc.2'
|
||||||
MAX_KEYWEIGHT = 1000
|
MAX_KEYWEIGHT = 1000
|
||||||
MAX_STORED_PATHS = 1000
|
MAX_STORED_PATHS = 1000
|
||||||
COMPLETION_SEPARATOR = '__'
|
COMPLETION_SEPARATOR = '__'
|
||||||
|
@ -63,7 +63,7 @@ case $PROMPT_COMMAND in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
function j {
|
function j {
|
||||||
if [[ ${@} =~ -.* ]]; then
|
if [[ ${@} =~ ^-{1,2}.* ]]; then
|
||||||
autojump ${@}
|
autojump ${@}
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -31,11 +31,11 @@ function autojump_preexec() {
|
|||||||
{ (autojump -a "$(pwd ${_PWD_ARGS})"&)>/dev/null 2>>|${AUTOJUMP_DATA_DIR}/.autojump_errors ; } 2>/dev/null
|
{ (autojump -a "$(pwd ${_PWD_ARGS})"&)>/dev/null 2>>|${AUTOJUMP_DATA_DIR}/.autojump_errors ; } 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload -U compinit; compinit
|
|
||||||
typeset -ga preexec_functions
|
typeset -ga preexec_functions
|
||||||
preexec_functions+=autojump_preexec
|
preexec_functions+=autojump_preexec
|
||||||
|
|
||||||
function j {
|
function j {
|
||||||
|
# Cannot use =~ due to MacPorts zsh v4.2, see issue #125.
|
||||||
if [[ ${@} == -* ]]; then
|
if [[ ${@} == -* ]]; then
|
||||||
autojump ${@}
|
autojump ${@}
|
||||||
return
|
return
|
||||||
|
@ -54,6 +54,19 @@ wrapper function.
|
|||||||
.fi
|
.fi
|
||||||
.SS ADDITIONAL CONFIGURATION
|
.SS ADDITIONAL CONFIGURATION
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
|
Enable ZSH Tab Completion
|
||||||
|
.RS 2
|
||||||
|
.PP
|
||||||
|
ZSH tab completion requires the \f[C]compinit\f[] module to be loaded.
|
||||||
|
Please add the following line to your ~/.zshrc:
|
||||||
|
.IP
|
||||||
|
.nf
|
||||||
|
\f[C]
|
||||||
|
autoload\ -U\ compinit;\ compinit
|
||||||
|
\f[]
|
||||||
|
.fi
|
||||||
|
.RE
|
||||||
|
.IP \[bu] 2
|
||||||
Always Ignore Case
|
Always Ignore Case
|
||||||
.RS 2
|
.RS 2
|
||||||
.PP
|
.PP
|
||||||
@ -123,6 +136,15 @@ In the above example, \f[C]j\ w\ in\f[] would then jump you into
|
|||||||
/home/user/work/inbox.
|
/home/user/work/inbox.
|
||||||
.RE
|
.RE
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
|
ZSH Tab Completion
|
||||||
|
.RS 2
|
||||||
|
.PP
|
||||||
|
Tab completion requires two tabs before autojump will display the
|
||||||
|
completion menu.
|
||||||
|
However if \f[C]setopt\ nolistambiguous\f[] is enabled, then only one
|
||||||
|
tab is required.
|
||||||
|
.RE
|
||||||
|
.IP \[bu] 2
|
||||||
Change Directory Weight
|
Change Directory Weight
|
||||||
.RS 2
|
.RS 2
|
||||||
.PP
|
.PP
|
||||||
|
10
docs/body.md
10
docs/body.md
@ -18,6 +18,12 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.
|
|||||||
|
|
||||||
## ADDITIONAL CONFIGURATION
|
## ADDITIONAL CONFIGURATION
|
||||||
|
|
||||||
|
- Enable ZSH Tab Completion
|
||||||
|
|
||||||
|
ZSH tab completion requires the `compinit` module to be loaded. Please add the following line to your ~/.zshrc:
|
||||||
|
|
||||||
|
autoload -U compinit; compinit
|
||||||
|
|
||||||
- Always Ignore Case
|
- Always Ignore Case
|
||||||
|
|
||||||
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:
|
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:
|
||||||
@ -47,6 +53,10 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.
|
|||||||
|
|
||||||
`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.
|
`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
|
||||||
|
|
||||||
|
Tab completion requires two tabs before autojump will display the completion menu. However if `setopt nolistambiguous` is enabled, then only one tab is required.
|
||||||
|
|
||||||
- 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:
|
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user