From 81fd057824a27157cb812b56d862189f4fe38325 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Mon, 23 Oct 2023 08:44:19 -0500 Subject: WSL: add .exe fallback --- zsh/.config/zsh/.zshrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'zsh/.config') diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 884114c..bdd34e1 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -91,6 +91,19 @@ compdef _dotnet_zsh_complete dotnet [[ -f ~/.config/tabtab/zsh/__tabtab.zsh ]] && . ~/.config/tabtab/zsh/__tabtab.zsh || true +if [ -n $WSL_DISTRO_NAME ] +then + command_not_found_handler() { + if [ -x "$(command -v $@.exe)" ]; then + $@.exe + else + echo >&2 "zsh: command not found: $@" + return 127 + fi +} +fi + + case "$ID" in debian | ubuntu ) source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh -- cgit v1.2.3