File tree Expand file tree Collapse file tree 4 files changed +52
-0
lines changed
Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ @ echo off
2+ setlocal EnableDelayedExpansion
3+
4+ echo %* | > nul findstr /rx \-.*
5+ if ERRORLEVEL 1 (
6+ for /f " delims=" %%i in ('" %~dp0 \autojump" %* ') do set new_path = %%i
7+ if exist !new_path! \nul (
8+ echo !new_path!
9+ pushd !new_path!
10+ REM endlocal is necessary so that we can change directory for outside of this script
11+ REM but will automatically popd. We mush pushd twice to work around this.
12+ pushd !new_path!
13+ endlocal
14+ popd
15+ ) else (
16+ echo autojump: directory %* not found
17+ echo try `autojump --help` for more information
18+ )
19+ ) else (
20+ " %~dp0 \autojump" %*
21+ )
Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ echo %* | > nul findstr /rx \-.*
4+ if ERRORLEVEL 1 (
5+ " %~dp0 \j.bat" " %cd% " %*
6+ ) else (
7+ " %~dp0 \autojump" %*
8+ )
Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ echo %* | > nul findstr /rx \-.*
4+ if ERRORLEVEL 1 (
5+ " %~dp0 \jc.bat" " %cd% " %*
6+ ) else (
7+ " %~dp0 \autojump" %*
8+ )
Original file line number Diff line number Diff line change 1+ @ echo off
2+ setlocal EnableDelayedExpansion
3+
4+ echo %* | > nul findstr /rx \-.*
5+ if ERRORLEVEL 1 (
6+ for /f " delims=" %%i in ('" %~dp0 \autojump" %* ') do set new_path = %%i
7+ if exist !new_path! \nul (
8+ start " " " explorer" !new_path!
9+ ) else (
10+ echo autojump: directory %* not found
11+ echo try `autojump --help` for more information
12+ )
13+ ) else (
14+ " %~dp0 \autojump" %*
15+ )
You can’t perform that action at this time.
0 commit comments