Переглянути джерело

use zsh change directory hook rather than pre-command hook

pull/180/head release-v21.4.2
William Ting 11 роки тому
джерело
коміт
ae978d3319
2 змінених файлів з 4 додано та 5 видалено
  1. +1
    -1
      bin/autojump
  2. +3
    -4
      bin/autojump.zsh

+ 1
- 1
bin/autojump Переглянути файл

@ -34,7 +34,7 @@ import re
import shutil
from tempfile import NamedTemporaryFile
VERSION = 'release-v21.4.1'
VERSION = 'release-v21.4.2'
MAX_KEYWEIGHT = 1000
MAX_STORED_PATHS = 1000
COMPLETION_SEPARATOR = '__'

+ 3
- 4
bin/autojump.zsh Переглянути файл

@ -23,8 +23,7 @@ command -v brew &>/dev/null \
&& [[ -d "`brew --prefix`/share/zsh/site-functions" ]] \
&& fpath=(`brew --prefix`/share/zsh/site-functions ${fpath})
# TODO: switch this to a chpwd hook instead (2013.02.01_1319, ting)
function autojump_preexec() {
function autojump_chpwd() {
if [[ "${AUTOJUMP_KEEP_SYMLINKS}" == "1" ]]; then
_PWD_ARGS=""
else
@ -33,8 +32,8 @@ function autojump_preexec() {
{ (autojump -a "$(pwd ${_PWD_ARGS})"&)>/dev/null 2>>|${AUTOJUMP_DATA_DIR}/.autojump_errors ; } 2>/dev/null
}
typeset -ga preexec_functions
preexec_functions+=autojump_preexec
typeset -ga chpwd_functions
chpwd_functions+=autojump_chpwd
function j {
# Cannot use =~ due to MacPorts zsh v4.2, see issue #125.

Завантаження…
Відмінити
Зберегти