1
0
mirror of https://github.com/wting/autojump synced 2024-09-28 22:10:45 +00:00
wting_autojump/bin/jo.bat

15 lines
355 B
Batchfile
Raw Normal View History

2014-01-12 19:34:28 +00:00
@echo off
2014-01-13 19:04:39 +00:00
setlocal EnableDelayedExpansion
2014-01-12 19:34:28 +00:00
echo %*|>nul findstr /rx \-.*
if ERRORLEVEL 1 (
for /f %%i in ('python "%~dp0\autojump" %*') do set new_path=%%i
2014-01-13 19:04:39 +00:00
if exist !new_path!\nul (
start !new_path!
2014-01-12 19:34:28 +00:00
) else (
echo autojump: directory %* not found
echo try `autojump --help` for more information
)
) else (
python "%~dp0\autojump" %*
2014-01-12 19:34:28 +00:00
)