Skip to content

Commit

Permalink
fix: Add a missing ' ' to the end of the python prompt (starship#2248)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Rose <[email protected]>
  • Loading branch information
offbyone and offbyone authored Mar 24, 2021
1 parent 3513aae commit aa7a805
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion src/configs/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/modules/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit aa7a805

Please sign in to comment.