mirror of https://github.com/wting/autojump
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
565 B
21 lines
565 B
@echo off
|
|
setlocal EnableDelayedExpansion
|
|
|
|
echo %*|>nul findstr /rx \-.*
|
|
if ERRORLEVEL 1 (
|
|
for /f %%i in ('python %~dp0\autojump %*') do set new_path=%%i
|
|
if exist !new_path!\nul (
|
|
echo !new_path!
|
|
pushd !new_path!
|
|
REM endlocal is necessary so that we can change directory for outside of this script
|
|
REM but will automatically popd. We mush pushd twice to work around this.
|
|
pushd !new_path!
|
|
endlocal
|
|
popd
|
|
) else (
|
|
echo autojump: directory %* not found
|
|
echo try `autojump --help` for more information
|
|
)
|
|
) else (
|
|
python %~dp0\autojump %*
|
|
) |