summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Rose <offby1@offby1.net>2021-03-24 08:41:08 -0700
committerGitHub <noreply@github.com>2021-03-24 10:41:08 -0500
commitaa7a8056bbf03d2c7e803c14550dc551c5754b31 (patch)
tree65113adafcbc6ee0af32c8c986339bc425f03135
parent3513aae3ed1c58670de110eaf71e6f21c330416c (diff)
fix: Add a missing ' ' to the end of the python prompt (#2248)
Co-authored-by: Chris Rose <offline@offby1.net>
-rw-r--r--docs/config/README.md2
-rw-r--r--src/configs/python.rs2
-rw-r--r--src/modules/python.rs6
3 files changed, 5 insertions, 5 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 93019fc6a..a3b708a06 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 b81a4677a..c31204251 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 e70dd02ed..80cc5ac98 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);