From 61cb33f4f990f6fce4ffa027c2f273df9056a5f8 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Fri, 26 Mar 2021 18:56:40 +0100 Subject: [PATCH] fix(pwsh): map home dir on theme export --- src/init/omp.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/init/omp.ps1 b/src/init/omp.ps1 index 27c2fafa..53ba1b77 100644 --- a/src/init/omp.ps1 +++ b/src/init/omp.ps1 @@ -81,6 +81,10 @@ function global:Export-PoshTheme { $Format = 'json' ) + if ($FilePath.StartsWith('~')) { + $FilePath = $FilePath.Replace('~', $HOME) + } + $config = $global:PoshSettings.Theme $omp = "::OMP::" $configString = @(&$omp --config="$config" --config-format="$Format" --print-config 2>&1)