diff --git a/README.md b/README.md index c700244..8c4f3cc 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,9 @@ zoxide can be installed in 4 easy steps: > ```batchfile > zoxide init cmd | cmd /d >nul > ``` + > + > **Note** + > zoxide only supports `cmd.exe` with Command Extensions v2 and above. diff --git a/templates/cmd.txt b/templates/cmd.txt index 90ae986..84ad5d9 100644 --- a/templates/cmd.txt +++ b/templates/cmd.txt @@ -28,8 +28,7 @@ {%- let section = "@rem ==========================================================================\n@rem" -%} {%- let not_configured = "@rem -- not configured --" -%} -@echo off & (set ComSpec) >nul 2>nul || exit /b 0 2>nul -setlocal DisableDelayedExpansion EnableExtensions +@echo off & setlocal DisableDelayedExpansion EnableExtensions if /i "%~f0"=="%~dpnx0" ( set ^"$p=%%nul +@rem +@rem Note: zoxide only supports `cmd.exe` with Command Extensions v2 and above.