"alignment": "right" for $ENV:POSH_GIT_STRING not working #3807
Code of Conduct
What happened?I've been customizing the fish theme and according to the docs I installed posh-git since its convinient to use the $ENV:POST_GIT_STRING variable. It renders but on the left leaving a large gap before it (image 1) when using it looks like this produces this This is where all the omp stuff is in my powershell profile Btw, thank you for such a great plugin, been using it for years and has been working very smoothly. Any help is appreciated! ThemeWhat OS are you seeing the problem on?Windows Which shell are you using?powershell Log outputVersion: 15.4.2
Shell: pwsh (7.3.4)
Segments:
ConsoleTitle(false) - 0 ms -
git(true) - 2 ms - �[93m[�[39m�[96mpowershell�[39m�[96m Γëí�[39m�[32m +0�[39m�[32m ~1�[39m�[32m -0�[39m�[93m |�[39m�[31m +3�[39m�[31m ~2�[39m�[31m -0�[39m�[31m !�[39m�[93m]�[39m
exit(false) - 0 ms -
root(false) - 0 ms -
session(true) - 0 ms - nathan@IDEAPAD_3 
path(true) - 0 ms - ~  Documents  PowerShell
git(true) - 0 ms -  powershell
text(true) - 0 ms - 
Run duration: 16.8204ms
Cache path: ~\AppData\Local\oh-my-posh
Config path: ~\Documents\PowerShell\OMP_Themes\fish.omp.json
Logs:
[DEBUG] 03:18:34.102 shell.go:Getenv:394 → NO DATA
[TRACE] 03:18:34.102 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 03:18:34.102 shell.go:Getenv:394 → ~\AppData\Local
[TRACE] 03:18:34.102 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 03:18:34.102 shell_windows.go:CachePath() - 509.5┬╡s
[DEBUG] 03:18:34.111 shell.go:Getenv:394 → ~\Documents\PowerShell\OMP_Themes\fish.omp.json
[TRACE] 03:18:34.111 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 03:18:34.115 shell.go:Shell:641 → process name: pwsh.exe
[TRACE] 03:18:34.115 shell.go:Shell() - 4.0772ms
[TRACE] 03:18:34.115 shell.go:resolveConfigPath() - 4.0772ms
[TRACE] 03:18:34.115 shell.go:Init() - 13.2569ms
[TRACE] 03:18:34.115 shell.go:Flags() - 0s
[TRACE] 03:18:34.116 config.go:loadConfig() - 1.0295ms
[TRACE] 03:18:34.116 shell.go:Flags() - 0s
[DEBUG] 03:18:34.116 shell.go:Getenv:394 → NO DATA
[TRACE] 03:18:34.116 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 03:18:34.116 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.116 shell_windows.go:WindowsRegistryKeyValue:206 → ColorizationColor(DWORD): 0xC43F3F3F
[TRACE] 03:18:34.116 shell.go:Shell() - 0s
[DEBUG] 03:18:34.116 shell.go:Getenv:394 → 7.3.4
[TRACE] 03:18:34.116 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 03:18:34.116 debug.go:PrintDebug:22 → Segment: Title
[TRACE] 03:18:34.116 shell.go:Flags() - 0s
[DEBUG] 03:18:34.116 block.go:Debug:230 → Segment: git
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.116 shell.go:Pwd:424 → ~\Documents\PowerShell
[TRACE] 03:18:34.116 shell.go:Pwd() - 0s
[DEBUG] 03:18:34.116 shell_windows.go:56 → ~
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[TRACE] 03:18:34.116 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:CommandPath:596 → C:\Program Files\Git\cmd\git.exe
[TRACE] 03:18:34.119 shell.go:CommandPath(git.exe) - 2.534ms
[TRACE] 03:18:34.119 shell.go:HasCommand(git.exe) - 2.534ms
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[TRACE] 03:18:34.119 shell.go:HasParentFilePath(.git) - 0s
[DEBUG] 03:18:34.119 properties.go:GetStringArray:52 → exclude_folders: []
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:Getenv:394 → NO DATA
[TRACE] 03:18:34.119 shell.go:Getenv(POSH_GIT_STATUS) - 0s
[DEBUG] 03:18:34.119 properties.go:GetBool:22 → fetch_status: false
[DEBUG] 03:18:34.119 properties.go:GetStringArray:52 → ignore_status: []
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:FileContent:519 Γåô
ref: refs/heads/powershell
[TRACE] 03:18:34.119 shell.go:FileContent(~\Documents\PowerShell\.git/HEAD) - 0s
[DEBUG] 03:18:34.119 properties.go:GetString:28 → 
[DEBUG] 03:18:34.119 properties.go:GetInt:40 → branch_max_length: 0
[DEBUG] 03:18:34.119 properties.go:GetBool:22 → fetch_upstream_icon: false
[TRACE] 03:18:34.119 shell_windows.go:Root() - 0s
[TRACE] 03:18:34.119 shell.go:Shell() - 0s
[TRACE] 03:18:34.119 shell.go:ErrorCode() - 0s
[TRACE] 03:18:34.119 shell_windows.go:IsWsl() - 0s
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:User:545 → nathan
[TRACE] 03:18:34.119 shell.go:User() - 0s
[DEBUG] 03:18:34.119 shell.go:Host:557 → IDEAPAD_3
[TRACE] 03:18:34.119 shell.go:Host() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:Getenv:394 → NO DATA
[TRACE] 03:18:34.119 shell.go:Getenv(SHLVL) - 0s
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:Shell() - 0s
[TRACE] 03:18:34.119 shell.go:Flags() - 0s
[DEBUG] 03:18:34.119 block.go:Debug:230 → Segment: exit
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:ErrorCode() - 0s
[DEBUG] 03:18:34.119 properties.go:GetBool:22 → always_enabled: false
[TRACE] 03:18:34.119 shell.go:ErrorCode() - 0s
[DEBUG] 03:18:34.119 block.go:Debug:230 → Segment: root
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell_windows.go:Root() - 0s
[DEBUG] 03:18:34.119 block.go:Debug:230 → Segment: session
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:Getenv:394 → NO DATA
[TRACE] 03:18:34.119 shell.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 03:18:34.119 shell.go:Getenv:394 → NO DATA
[TRACE] 03:18:34.119 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:Shell() - 0s
[DEBUG] 03:18:34.119 block.go:Debug:230 → Segment: path
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[TRACE] 03:18:34.119 shell.go:Shell() - 0s
[TRACE] 03:18:34.119 shell.go:Flags() - 0s
[DEBUG] 03:18:34.119 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 03:18:34.119 properties.go:GetString:28 → 
[DEBUG] 03:18:34.119 properties.go:GetString:28 → 
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 properties.go:GetString:28 → ~
[DEBUG] 03:18:34.119 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[DEBUG] 03:18:34.119 properties.go:GetString:28 → full
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[DEBUG] 03:18:34.119 properties.go:GetStringArray:52 → cycle: []
[DEBUG] 03:18:34.119 properties.go:GetString:28 → NO DATA
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[DEBUG] 03:18:34.119 properties.go:GetString:28 → 
[DEBUG] 03:18:34.119 properties.go:GetBool:22 → cycle_folder_separator: false
[TRACE] 03:18:34.119 shell.go:PathSeparator() - 0s
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[TRACE] 03:18:34.119 shell_windows.go:IsWsl() - 0s
[TRACE] 03:18:34.119 shell.go:StackCount() - 0s
[DEBUG] 03:18:34.119 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 03:18:34.119 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 03:18:34.119 win32_windows.go:isWriteable:311 Γåô
WRITE_DAC
WRITE_OWNER
SYNCHRONIZE
DELETE
READ_CONTROL
[DEBUG] 03:18:34.119 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 03:18:34.119 shell_windows.go:DirIsWritable() - 0s
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:Shell() - 0s
[DEBUG] 03:18:34.119 block.go:Debug:230 → Segment: git
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:CommandPath:590 → C:\Program Files\Git\cmd\git.exe
[TRACE] 03:18:34.119 shell.go:CommandPath(git.exe) - 0s
[TRACE] 03:18:34.119 shell.go:HasCommand(git.exe) - 0s
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[TRACE] 03:18:34.119 shell.go:HasParentFilePath(.git) - 0s
[DEBUG] 03:18:34.119 properties.go:GetStringArray:52 → exclude_folders: []
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:Getenv:394 → NO DATA
[TRACE] 03:18:34.119 shell.go:Getenv(POSH_GIT_STATUS) - 0s
[DEBUG] 03:18:34.119 properties.go:GetBool:22 → fetch_status: false
[DEBUG] 03:18:34.119 properties.go:GetStringArray:52 → ignore_status: []
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[DEBUG] 03:18:34.119 shell.go:FileContent:519 Γåô
ref: refs/heads/powershell
[TRACE] 03:18:34.119 shell.go:FileContent(~\Documents\PowerShell\.git/HEAD) - 0s
[DEBUG] 03:18:34.119 properties.go:GetString:28 → 
[DEBUG] 03:18:34.119 properties.go:GetInt:40 → branch_max_length: 0
[DEBUG] 03:18:34.119 properties.go:GetBool:22 → fetch_upstream_icon: false
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:Shell() - 0s
[DEBUG] 03:18:34.119 block.go:Debug:230 → Segment: text
[TRACE] 03:18:34.119 shell.go:Pwd() - 0s
[DEBUG] 03:18:34.119 shell_windows.go:56 → ~
[TRACE] 03:18:34.119 shell.go:GOOS() - 0s
[TRACE] 03:18:34.119 shell.go:TemplateCache() - 0s
[TRACE] 03:18:34.119 shell.go:Shell() - 0s
[DEBUG] 03:18:34.119 shell.go:Getenv:394 → ~\AppData\Local
[TRACE] 03:18:34.119 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 03:18:34.119 shell_windows.go:CachePath() - 0s
[TRACE] 03:18:34.119 shell.go:Flags() - 0s |
Replies: 2 comments 2 replies
|
@pranavpa8788 what are you trying to achieve because this technically correct. Your first block renders right and the second left without a newline. So if you want the first one on the right, then start left again, add |
|
@JanDeDobbeleer Thanks for the reply! well I wanted to achieve similar look to agnoster minimal theme. And also I forgot to mention above is that it works perfectly (without having to add newline/rprompt) for template such as this and only behaves like I showed above when using POST_GIT_STRING Also the foreground attribute isn't changing the color (background attribute works) I've tried setting variables I've changed the first block to an rprompt and it looks right now. Except it isn't being rendered at the far end (right edge) but more so towards the middle like this. How can I make it "stick" to the right far end |



@pranavpa8788 I would propose to use native posh-git integration rather than the string created by posh-git as it contains ANSI and will have unwanted side-effects. That's also beyond our control.