summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2023-10-23 08:44:19 -0500
committerMatt Strapp <matt@mattstrapp.net>2023-10-23 08:44:19 -0500
commit81fd057824a27157cb812b56d862189f4fe38325 (patch)
tree688490c699084a2b219c8fa03b8b7637555f1bd0
parentAdd more ZSH history options (diff)
downloaddotfiles-81fd057824a27157cb812b56d862189f4fe38325.tar
dotfiles-81fd057824a27157cb812b56d862189f4fe38325.tar.gz
dotfiles-81fd057824a27157cb812b56d862189f4fe38325.tar.bz2
dotfiles-81fd057824a27157cb812b56d862189f4fe38325.tar.lz
dotfiles-81fd057824a27157cb812b56d862189f4fe38325.tar.xz
dotfiles-81fd057824a27157cb812b56d862189f4fe38325.tar.zst
dotfiles-81fd057824a27157cb812b56d862189f4fe38325.zip
WSL: add .exe fallback
Diffstat (limited to '')
-rw-r--r--zsh/.config/zsh/.zshrc13
1 files changed, 13 insertions, 0 deletions
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