From 0d0f557580ab342fcb9de40348db322cf036f45d Mon Sep 17 00:00:00 2001 From: mataha Date: Sun, 11 Jun 2023 04:23:24 +0200 Subject: [PATCH] Make the Command Extensions requirement more clear --- README.md | 3 +++ templates/cmd.txt | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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.