您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

20 行
565 B

  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. echo %*|>nul findstr /rx \-.*
  4. if ERRORLEVEL 1 (
  5. for /f %%i in ('python %~dp0\autojump %*') do set new_path=%%i
  6. if exist !new_path!\nul (
  7. echo !new_path!
  8. pushd !new_path!
  9. REM endlocal is necessary so that we can change directory for outside of this script
  10. REM but will automatically popd. We mush pushd twice to work around this.
  11. pushd !new_path!
  12. endlocal
  13. popd
  14. ) else (
  15. echo autojump: directory %* not found
  16. echo try `autojump --help` for more information
  17. )
  18. ) else (
  19. python %~dp0\autojump %*
  20. )