Ver código fonte

Handle `j -- -foo` (for bash and zsh only)

Ref: #310
pull/311/head
Daniel Hahler 10 anos atrás
committed by William Ting
pai
commit
c0c9398794
3 arquivos alterados com 13 adições e 9 exclusões
  1. +1
    -1
      bin/autojump
  2. +6
    -4
      bin/autojump.bash
  3. +6
    -4
      bin/autojump.zsh

+ 1
- 1
bin/autojump Ver arquivo

@ -60,7 +60,7 @@ from autojump_utils import sanitize
from autojump_utils import take
from autojump_utils import unico
VERSION = '22.1.1-beta'
VERSION = '22.2.0-beta'
FUZZY_MATCH_THRESHOLD = 0.6
TAB_ENTRIES_COUNT = 9
TAB_SEPARATOR = '__'

+ 6
- 4
bin/autojump.bash Ver arquivo

@ -54,7 +54,7 @@ esac
# default autojump command
j() {
if [[ ${@} =~ ^-{1,2}.* ]]; then
if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then
autojump ${@}
return
fi
@ -74,8 +74,9 @@ j() {
# jump to child directory (subdirectory of current path)
jc() {
if [[ ${@} == -* ]]; then
if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then
autojump ${@}
return
else
j $(pwd) ${@}
fi
@ -84,7 +85,7 @@ jc() {
# open autojump results in file browser
jo() {
if [[ ${@} == -* ]]; then
if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then
autojump ${@}
return
fi
@ -116,8 +117,9 @@ jo() {
# open autojump results (child directory) in file browser
jco() {
if [[ ${@} == -* ]]; then
if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then
autojump ${@}
return
else
jo $(pwd) ${@}
fi

+ 6
- 4
bin/autojump.zsh Ver arquivo

@ -44,7 +44,7 @@ chpwd_functions+=autojump_chpwd
# default autojump command
j() {
if [[ ${@} == -* ]]; then
if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then
autojump ${@}
return
fi
@ -65,8 +65,9 @@ j() {
# jump to child directory (subdirectory of current path)
jc() {
if [[ ${@} == -* ]]; then
if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then
autojump ${@}
return
else
j $(pwd) ${@}
fi
@ -75,7 +76,7 @@ jc() {
# open autojump results in file browser
jo() {
if [[ ${@} == -* ]]; then
if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then
autojump ${@}
return
fi
@ -108,8 +109,9 @@ jo() {
# open autojump results (child directory) in file browser
jco() {
if [[ ${@} == -* ]]; then
if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then
autojump ${@}
return
else
jo $(pwd) ${@}
fi

Carregando…
Cancelar
Salvar