From 26dc2f1ebdafa41606f2160609838124a1da817e Mon Sep 17 00:00:00 2001 From: Jaehaks Date: Mon, 8 Jul 2024 09:13:42 +0900 Subject: [PATCH] fix(lfcd.cmd) : cd to other drive / fix non-english encoding (#1772) 1) add `/d` to cd command for moving other drive 2) change code page number to read non-english output of `lf -print-last-dir` although current code page is 949 --- etc/lfcd.cmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/lfcd.cmd b/etc/lfcd.cmd index ce23dd64..e8443d81 100644 --- a/etc/lfcd.cmd +++ b/etc/lfcd.cmd @@ -3,4 +3,5 @@ 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. -for /f "usebackq tokens=*" %%d in (`lf -print-last-dir %*`) do cd %%d +chcp 65001 > nul 2>&1 +for /f "usebackq tokens=*" %%d in (`lf -print-last-dir %*`) do cd /d %%d