dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

j.cmd (461B)


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