From 42315d8cecab61757530d709f63d1c135f8a6a5b Mon Sep 17 00:00:00 2001 From: David Refoua Date: Fri, 18 Oct 2024 03:18:17 +0330 Subject: [PATCH] enable `/d` flag in `excd` by default --- vendor/bin/excd.cmd | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/vendor/bin/excd.cmd b/vendor/bin/excd.cmd index c957740..a4ac4bd 100644 --- a/vendor/bin/excd.cmd +++ b/vendor/bin/excd.cmd @@ -1,6 +1,8 @@ -@if "%~1"=="/?" (@cd %*) -@set excd=%* -@set excd=%excd:"=% -@if "%excd:~0,1%"=="~" (@set excd=%userprofile%\%excd:~1%) -@if not "%~1"=="/d" (@set excd_param="/d") else (@set excd_param=) -@cd %excd_param% "%excd%" +@echo off +set excd=%* +set excd=%excd:"=% +set excd_param=/d +if /i "%excd:~0,2%"=="/d" set "excd=%excd:~2%" +if "%excd:~0,1%"=="~" (set excd=%userprofile%\%excd:~1%) +if "%excd:~0,1%"=="/" (set excd_param=) +cd %excd_param% %excd%