mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-28 15:56:28 +00:00
fix(python): Fix venv name not showing when using pyenv (#1046)
This fixes an issue where the name of the virtual environment is not being shown when using the `pyenv_version_name` setting.
This commit is contained in:
parent
7c45f74d11
commit
beed0acc6c
@ -47,13 +47,13 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
let python_version = get_python_version()?;
|
||||
let formatted_version = format_python_version(&python_version);
|
||||
module.create_segment("version", &SegmentConfig::new(&formatted_version));
|
||||
};
|
||||
|
||||
if let Some(virtual_env) = get_python_virtual_env() {
|
||||
module.create_segment(
|
||||
"virtualenv",
|
||||
&SegmentConfig::new(&format!(" ({})", virtual_env)),
|
||||
);
|
||||
};
|
||||
if let Some(virtual_env) = get_python_virtual_env() {
|
||||
module.create_segment(
|
||||
"virtualenv",
|
||||
&SegmentConfig::new(&format!(" ({})", virtual_env)),
|
||||
);
|
||||
};
|
||||
|
||||
Some(module)
|
||||
|
Loading…
Reference in New Issue
Block a user