all repos — archive/dotfiles @ f28fe7ef1170a5049f294974b57a6dc7292986b0

Superseded by nixfiles

zsh: Add check for Windows Subsystem for Linux
Alan Pearce alan@alanpearce.uk
Mon, 01 May 2017 13:51:15 +0200
commit

f28fe7ef1170a5049f294974b57a6dc7292986b0

parent

7d5c681af4ac7a571e2bd8ff45b020562b5b3611

1 files changed, 9 insertions(+), 0 deletions(-)

jump to
M zsh/.config/zsh/.zshenvzsh/.config/zsh/.zshenv
@@ -37,6 +37,15 @@ os=unknown       ;;
   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