summary refs log tree commit diff stats
path: root/zsh
diff options
context:
space:
mode:
authorAlan Pearce2017-05-01 13:51:15 +0200
committerAlan Pearce2017-05-13 10:03:18 +0200
commitf28fe7ef1170a5049f294974b57a6dc7292986b0 (patch)
tree099189a9e97c22707c7b401b8ea949c93863b805 /zsh
parent7d5c681af4ac7a571e2bd8ff45b020562b5b3611 (diff)
downloadnixfiles-f28fe7ef1170a5049f294974b57a6dc7292986b0.tar.lz
nixfiles-f28fe7ef1170a5049f294974b57a6dc7292986b0.tar.zst
nixfiles-f28fe7ef1170a5049f294974b57a6dc7292986b0.zip
zsh: Add check for Windows Subsystem for Linux
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.config/zsh/.zshenv9
1 files changed, 9 insertions, 0 deletions
diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv
index b026d9a1..114e5ce9 100644
--- a/zsh/.config/zsh/.zshenv
+++ b/zsh/.config/zsh/.zshenv
@@ -37,6 +37,15 @@ then
       ;;
   esac
 
+  if [[ $os == "linux" ]]
+  then
+    read osrelease < /proc/sys/kernel/osrelease
+    if [[ $osrelease =~ Microsoft$ ]]
+    then
+      windows=1
+    fi
+  fi
+
   case $MACHTYPE in
     *64)
       arch=amd64