1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Fix #86: ZSH tab completion

Forces zsh to load compinit required for tab completion.
This commit is contained in:
William Ting 2012-06-23 10:20:27 -10:00
parent 1994d0bb13
commit e96dc4c9d8
2 changed files with 3 additions and 2 deletions

View File

@ -29,7 +29,7 @@ import shutil
import sys import sys
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
VERSION = 'release-v20.9.3' VERSION = 'release-v20.9.4'
MAX_KEYWEIGHT = 1000 MAX_KEYWEIGHT = 1000
MAX_STORED_PATHS = 1000 MAX_STORED_PATHS = 1000
COMPLETION_SEPARATOR = '__' COMPLETION_SEPARATOR = '__'
@ -253,7 +253,7 @@ def options():
parser.add_argument('-b', '--bash', action="store_true", default=False, parser.add_argument('-b', '--bash', action="store_true", default=False,
help='enclose directory quotes to prevent errors') help='enclose directory quotes to prevent errors')
parser.add_argument('--complete', action="store_true", default=False, parser.add_argument('--complete', action="store_true", default=False,
help='used for bash tab completion') help='used for tab completion')
parser.add_argument('--purge', action="store_true", default=False, parser.add_argument('--purge', action="store_true", default=False,
help='delete all database entries that no longer exist on system') help='delete all database entries that no longer exist on system')
parser.add_argument('-s', '--stat', action="store_true", default=False, parser.add_argument('-s', '--stat', action="store_true", default=False,

View File

@ -31,6 +31,7 @@ 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