add cd scripts for cmd.exe and powershell
This commit is contained in:
1 parent
098332fc05
commit
fd2d3a0f86
2 files changed
+30
No files matched your search
@@ -0,0 +1,15 @@
|
||||
@echo off
|
||||
rem Change working dir in cmd.exe to last dir in lf on exit.
|
||||
rem
|
||||
rem You need to put this file to a folder in %PATH% variable.
|
||||
|
||||
:tmploop
|
||||
set tmpfile="%tmp%\lf.%random%.tmp"
|
||||
if exist "%tmpfile%" goto:tmploop
|
||||
lf -last-dir-path="%tmpfile%" %*
|
||||
if not exist "%tmpfile%" exit
|
||||
set /p dir=<"%tmpfile%"
|
||||
del /f "%tmpfile%"
|
||||
if not exist "%dir%" exit
|
||||
if "%dir%" == "%cd%" exit
|
||||
cd "%dir%"
|
||||
Reference in new issue
Block a user