cli: Rename script zed-wsl to zed, and enable on non-WSL (#37631)

Jakub Konka created

Closes #23026

With this hotfix, git committing from the built-in Zed terminal (well,
PowerShell), now works.

Release Notes:

- N/A

Change summary

.gitattributes                      | 2 +-
crates/zed/resources/windows/zed.sh | 4 ++--
script/bundle-windows.ps1           | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)

Detailed changes

.gitattributes 🔗

@@ -2,4 +2,4 @@
 *.json linguist-language=JSON-with-Comments
 
 # Ensure the WSL script always has LF line endings, even on Windows
-crates/zed/resources/windows/zed-wsl text eol=lf
+crates/zed/resources/windows/zed text eol=lf

crates/zed/resources/windows/zed-wsl → crates/zed/resources/windows/zed.sh 🔗

@@ -20,6 +20,6 @@ if [ $IN_WSL = true ]; then
     "$ZED_PATH/zed.exe" --wsl "$WSL_USER@$WSL_DISTRO_NAME" "$@"
     exit $?
 else
-    echo "Only WSL is supported for now" >&2
-    exit 1
+    "$ZED_PATH/zed.exe" "$@"
+    exit $?
 fi

script/bundle-windows.ps1 🔗

@@ -150,7 +150,7 @@ function CollectFiles {
     Move-Item -Path "$innoDir\zed_explorer_command_injector.appx" -Destination "$innoDir\appx\zed_explorer_command_injector.appx" -Force
     Move-Item -Path "$innoDir\zed_explorer_command_injector.dll" -Destination "$innoDir\appx\zed_explorer_command_injector.dll" -Force
     Move-Item -Path "$innoDir\cli.exe" -Destination "$innoDir\bin\zed.exe" -Force
-    Move-Item -Path "$innoDir\zed-wsl" -Destination "$innoDir\bin\zed" -Force
+    Move-Item -Path "$innoDir\zed.sh" -Destination "$innoDir\bin\zed" -Force
     Move-Item -Path "$innoDir\auto_update_helper.exe" -Destination "$innoDir\tools\auto_update_helper.exe" -Force
     Move-Item -Path ".\AGS_SDK-6.3.0\ags_lib\lib\amd_ags_x64.dll" -Destination "$innoDir\amd_ags_x64.dll" -Force
 }