From 9f4f9d30dbc1532b7ca3a5bf3ef85fa91bc03f7d Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Mon, 9 Aug 2021 21:13:40 +0200 Subject: [PATCH] fix(init): quote path for spaces resolves #879 --- docs/docs/install-customize-cmd.mdx | 10 +++++----- src/init/omp.bash | 2 +- src/init/omp.fish | 2 +- src/init/omp.zsh | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs/install-customize-cmd.mdx b/docs/docs/install-customize-cmd.mdx index e904517f..97edb65a 100644 --- a/docs/docs/install-customize-cmd.mdx +++ b/docs/docs/install-customize-cmd.mdx @@ -14,13 +14,13 @@ import TabItem from "@theme/TabItem"; ```powershell -Export-PoshTheme -FilePath ~/.mytheme.omp.json -Format json +Export-PoshTheme -FilePath "~/.mytheme.omp.json" -Format json ``` Once you're done editing, adjust your `$PROFILE` to use your newly created theme. ```powershell -oh-my-posh --init --shell pwsh --config ~/.mytheme.omp.json | Invoke-Expression +oh-my-posh --init --shell pwsh --config "~/.mytheme.omp.json" | Invoke-Expression ``` @@ -33,7 +33,7 @@ export_poshconfig "~/.mytheme.omp.json" json Once you're done editing, adjust `~/.zshrc` to use your newly created theme. ```bash -eval "$(oh-my-posh --init --shell zsh --config ~/.mytheme.omp.json)" +eval "$(oh-my-posh --init --shell zsh --config '~/.mytheme.omp.json')" ``` When adjusted, reload your profile for the changes to take effect. @@ -52,7 +52,7 @@ export_poshconfig "~/.mytheme.omp.json" json Once you're done editing, adjust `~/.bashrc` to use your newly created theme. ```bash -eval "$(oh-my-posh --init --shell bash --config ~/.mytheme.omp.json)" +eval "$(oh-my-posh --init --shell bash --config '~/.mytheme.omp.json')" ``` When adjusted, reload your profile for the changes to take effect. @@ -71,7 +71,7 @@ export_poshconfig "~/.mytheme.omp.json" json Once you're done editing, adjust `config.fish` to use your newly created theme. ```bash -oh-my-posh --init --shell fish --config ~/.mytheme.omp.json | source +oh-my-posh --init --shell fish --config '~/.mytheme.omp.json' | source ``` Once adjusted, reload your config for the changes to take effect. diff --git a/src/init/omp.bash b/src/init/omp.bash index 40d17652..691d982e 100644 --- a/src/init/omp.bash +++ b/src/init/omp.bash @@ -1,4 +1,4 @@ -export POSH_THEME=::CONFIG:: +export POSH_THEME="::CONFIG::" export POWERLINE_COMMAND="oh-my-posh" export CONDA_PROMPT_MODIFIER=false diff --git a/src/init/omp.fish b/src/init/omp.fish index 7f9088fc..54dbaaa8 100644 --- a/src/init/omp.fish +++ b/src/init/omp.fish @@ -1,4 +1,4 @@ -set -g posh_theme ::CONFIG:: +set -g posh_theme "::CONFIG::" set -g POWERLINE_COMMAND "oh-my-posh" set -g CONDA_PROMPT_MODIFIER false diff --git a/src/init/omp.zsh b/src/init/omp.zsh index 525597ad..367bdcd7 100644 --- a/src/init/omp.zsh +++ b/src/init/omp.zsh @@ -1,4 +1,4 @@ -export POSH_THEME=::CONFIG:: +export POSH_THEME="::CONFIG::" export POWERLINE_COMMAND="oh-my-posh" export CONDA_PROMPT_MODIFIER=false