Skip to content

Commit

Permalink
enable /d flag in excd by default
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSDavidSoft authored Oct 17, 2024
1 parent c6dbb89 commit 42315d8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions vendor/bin/excd.cmd
Original file line number Diff line number Diff line change
@@ -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%

0 comments on commit 42315d8

Please sign in to comment.