From 358b4192f70ef88209ee333181b29cd31753baa5 Mon Sep 17 00:00:00 2001 From: Joachim Nielandt Date: Fri, 12 Mar 2021 16:01:16 +0100 Subject: [PATCH 1/2] Changed .zshrc to a template file. Now supports WSL2 --- dot_zshrc => dot_zshrc.tmpl | 5 +++++ 1 file changed, 5 insertions(+) rename dot_zshrc => dot_zshrc.tmpl (96%) diff --git a/dot_zshrc b/dot_zshrc.tmpl similarity index 96% rename from dot_zshrc rename to dot_zshrc.tmpl index d91bc10..a4a5d77 100644 --- a/dot_zshrc +++ b/dot_zshrc.tmpl @@ -12,7 +12,12 @@ for file in ~/.dotfiles/zsh/custom/*.zsh; do done # Path to your oh-my-zsh installation. +# WSL2 would be Ubuntu, ohmyzsh is installed in userfolder +{{ if (contains "WSL2" .chezmoi.kernel.osrelease) }} +ZSH=~/.oh-my-zsh/ +{{ else }} ZSH=/usr/share/oh-my-zsh/ +{{ end }} # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, From d458fc068825e5efae8410beae7f56aeeaa917c5 Mon Sep 17 00:00:00 2001 From: Joachim Nielandt Date: Mon, 15 Mar 2021 16:15:48 +0100 Subject: [PATCH 2/2] Added microsoft-standard to .zshrc template (other osrelease option for WSL) --- dot_zshrc.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index a4a5d77..ac9af55 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -13,7 +13,7 @@ done # Path to your oh-my-zsh installation. # WSL2 would be Ubuntu, ohmyzsh is installed in userfolder -{{ if (contains "WSL2" .chezmoi.kernel.osrelease) }} +{{ if or (contains "WSL2" .chezmoi.kernel.osrelease) (contains "microsoft-standard" .chezmoi.kernel.osrelease) }} ZSH=~/.oh-my-zsh/ {{ else }} ZSH=/usr/share/oh-my-zsh/