mirror of
https://github.com/wting/autojump
synced 2026-03-02 03:49:26 +00:00
Add jc function, jump to a subdirectory of the current working directory.
Closes #156.
This commit is contained in:
@@ -34,7 +34,7 @@ import re
|
||||
import shutil
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
VERSION = 'release-v21.1.4'
|
||||
VERSION = 'release-v21.2.0'
|
||||
MAX_KEYWEIGHT = 1000
|
||||
MAX_STORED_PATHS = 1000
|
||||
COMPLETION_SEPARATOR = '__'
|
||||
|
||||
@@ -75,7 +75,7 @@ function j {
|
||||
return
|
||||
fi
|
||||
|
||||
new_path="$(autojump $@)"
|
||||
new_path="$(autojump ${@})"
|
||||
if [ -d "${new_path}" ]; then
|
||||
echo -e "\\033[31m${new_path}\\033[0m"
|
||||
cd "${new_path}"
|
||||
@@ -85,3 +85,11 @@ function j {
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
function jc {
|
||||
if [[ ${@} == -* ]]; then
|
||||
j ${@}
|
||||
else
|
||||
j $(pwd) ${@}
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ function j {
|
||||
return
|
||||
fi
|
||||
|
||||
local new_path="$(autojump $@)"
|
||||
local new_path="$(autojump ${@})"
|
||||
if [ -d "${new_path}" ]; then
|
||||
echo -e "\\033[31m${new_path}\\033[0m"
|
||||
cd "${new_path}"
|
||||
@@ -52,3 +52,11 @@ function j {
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
function jc {
|
||||
if [[ ${@} == -* ]]; then
|
||||
j ${@}
|
||||
else
|
||||
j $(pwd) ${@}
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user