From aa7a8056bbf03d2c7e803c14550dc551c5754b31 Mon Sep 17 00:00:00 2001 From: Chris Rose Date: Wed, 24 Mar 2021 08:41:08 -0700 Subject: [PATCH] fix: Add a missing ' ' to the end of the python prompt (#2248) Co-authored-by: Chris Rose --- docs/config/README.md | 2 +- src/configs/python.rs | 2 +- src/modules/python.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/config/README.md b/docs/config/README.md index 93019fc6..a3b708a0 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -2128,7 +2128,7 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | | `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | diff --git a/src/configs/python.rs b/src/configs/python.rs index b81a4677..c3120425 100644 --- a/src/configs/python.rs +++ b/src/configs/python.rs @@ -22,7 +22,7 @@ impl<'a> Default for PythonConfig<'a> { pyenv_version_name: false, pyenv_prefix: "pyenv ", python_binary: VecOr(vec!["python", "python3", "python2"]), - format: "via [${symbol}${pyenv_prefix}(${version} )(\\($virtualenv\\))]($style)", + format: "via [${symbol}${pyenv_prefix}(${version} )(\\($virtualenv\\) )]($style)", style: "yellow bold", symbol: "🐍 ", disabled: false, diff --git a/src/modules/python.rs b/src/modules/python.rs index e70dd02e..80cc5ac9 100644 --- a/src/modules/python.rs +++ b/src/modules/python.rs @@ -313,7 +313,7 @@ mod tests { let expected = Some(format!( "via {}", - Color::Yellow.bold().paint("🐍 v3.8.0 (my_venv)") + Color::Yellow.bold().paint("🐍 v3.8.0 (my_venv) ") )); assert_eq!(actual, expected); @@ -331,7 +331,7 @@ mod tests { let expected = Some(format!( "via {}", - Color::Yellow.bold().paint("🐍 v3.8.0 (my_venv)") + Color::Yellow.bold().paint("🐍 v3.8.0 (my_venv) ") )); assert_eq!(actual, expected); @@ -358,7 +358,7 @@ prompt = 'foo' let expected = Some(format!( "via {}", - Color::Yellow.bold().paint("🐍 v3.8.0 (foo)") + Color::Yellow.bold().paint("🐍 v3.8.0 (foo) ") )); assert_eq!(actual, expected);