JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
16.79k stars 2.35k forks source link

Python segment not displayed in home folder #649

Closed sobayed closed 3 years ago

sobayed commented 3 years ago

Prerequisites

Description

In version 3.137.3 the Python segment is not showing in my home folder, even though display_mode is set to "always" in the respective part of the configuration. This seems to only affect the home folder, because when changing e.g. to an empty folder the segment shows up (see screenshot).

oh-my-posh_3 137 2_no_python_segment_in_home_folder

My configuration ```json { "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "type": "prompt", "alignment": "left", "segments": [ { "type": "root", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#100e23", "background": "#ffe9aa" }, { "type": "session", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#100e23", "background": "#ffffff" }, { "type": "path", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#100e23", "background": "#91ddff", "properties": { "folder_icon": "\uF115", "folder_separator_icon": " \uE0B1 ", "style": "full" } }, { "type": "git", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#193549", "background": "#95ffa4" }, { "type": "python", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#100e23", "background": "#906cff", "properties": { "prefix": " \uE235 ", "display_virtual_env": true, "display_default": true, "display_version": true, "display_mode": "always" } }, { "type": "exit", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#ffffff", "background": "#ff8080", "properties": { "prefix": " \uE20F" } } ] }, { "type": "newline" }, { "type": "prompt", "alignment": "left", "segments": [ { "type": "text", "style": "plain", "foreground": "#007ACC", "properties": { "prefix": "", "text": "\u276F" } } ] } ], "final_space": false } ```

Environment

Steps to Reproduce

  1. Set display_mode: "always in the "python" segment of the configuration
  2. Open Powershell in Windows Terminal

Expected behavior: Python segment showing in all folders when display_mode: "always

Actual behavior: Python segment not showing in home folder

JanDeDobbeleer commented 3 years ago

That's actually by design as the home folder is generally excluded. Maybe it's indeed a better idea to also allow that for always enabled.

sobayed commented 3 years ago

Ah, thanks for the clarification. I was just not expecting this for display_mode: "always" so maybe updating the docs might also be an option.

JanDeDobbeleer commented 3 years ago

@sobayed you have a valid point I didn't consider so allow me to adjust how that works.

amine-aboufirass commented 2 years ago

Which posh themes actually have a python segment? How can I find this out?

JanDeDobbeleer commented 2 years ago

You can do a quick search here. Or create your own config as it's rather trivial to add it.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.