Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in Bash in TTY #5354

Closed
1 task done
ThePython10110 opened this issue Jul 26, 2024 · 0 comments
Closed
1 task done

Not working in Bash in TTY #5354

ThePython10110 opened this issue Jul 26, 2024 · 0 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@ThePython10110
Copy link

ThePython10110 commented Jul 26, 2024

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

Oh My Posh (at least for me) fails to run in a TTY when using Bash. Weirdly, it works perfectly in the exact same TTY using Bash in Tmux, or using ZSH, and it also works fine with Bash in a GUI terminal (Kitty).
eval "$(oh-my-posh init bash --config path/to/my/theme.omp.json simply does nothing (though it works fine everywhere else). It has nothing to do with anything in my .bashrc or .bashprofile, since I also tested it with bash --norc --noprofile.

I use Arch, BTW.

Theme

My own custom config (based on lambdageneration), but that doesn't really apply.

What OS are you seeing the problem on?

Linux

Which shell are you using?

bash, zsh

Log output

Version: 22.0.2

Shell: bash (5.2.26(1)-release)

Prompt:


 arch | 0ms | ~  :)                                                                                                                                                                                             <username>@arch-btw | 7:52:09 AM, 26 
 bash> 

Segments:

ConsoleTitle(false)                        -   0 ms
Os(true)                                   -   0 ms
Executiontime(true)                        -   0 ms
Path(true)                                 -   0 ms
Status(true)                               -   0 ms
Session(true)                              -   1 ms
Time(true)                                 -   0 ms
Path(true)                                 -   0 ms

Run duration: 11.940366ms

Cache path: /home/<username>/.cache/oh-my-posh

Config path: /home/<username>/.config/oh-my-posh.minimal.omp.json

Logs:

[DEBUG] 09:52:09.093 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.094 os.go:Getenv(OMP_CACHE_DIR) - 66.787µs
[DEBUG] 09:52:09.094 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.094 os.go:Getenv(XDG_CACHE_HOME) - 3.729µs
[TRACE] 09:52:09.094 os_unix.go:CachePath() - 110.503µs
[DEBUG] 09:52:09.097 os.go:Getenv:309 → /home/<username>/.config/oh-my-posh.minimal.omp.json
[TRACE] 09:52:09.097 os.go:Getenv(POSH_THEME) - 8.517µs
[DEBUG] 09:52:09.097 os_unix.go:Platform:87 → arch
[TRACE] 09:52:09.097 os.go:resolveConfigPath() - 23.393µs
[TRACE] 09:52:09.097 os.go:Init() - 3.189406ms
[TRACE] 09:52:09.097 os.go:Flags() - 52ns
[TRACE] 09:52:09.099 load.go:loadConfig() - 1.909071ms
[TRACE] 09:52:09.099 os.go:Flags() - 90ns
[DEBUG] 09:52:09.099 debug.go:44 → Terminal shell: %s shell
[DEBUG] 09:52:09.099 debug.go:44 → Terminal program: %s Unknown
[DEBUG] 09:52:09.099 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.099 os.go:Getenv(OMP_CACHE_DISABLED) - 4.546µs
[DEBUG] 09:52:09.099 os.go:Shell:584 → no shell name provided in flags, trying to detect it
[DEBUG] 09:52:09.100 os.go:Shell:592 → process name: bash
[TRACE] 09:52:09.100 os.go:Shell() - 1.195333ms
[DEBUG] 09:52:09.100 os.go:Getenv:309 → 5.2.26(1)-release
[TRACE] 09:52:09.100 os.go:Getenv(POSH_SHELL_VERSION) - 3.771µs
[DEBUG] 09:52:09.100 debug.go:PrintDebug:23 → Segment: Title
[DEBUG] 09:52:09.100 text.go:Render:73 → Rendering template: 
[TRACE] 09:52:09.100 os.go:Shell() - 74ns
[DEBUG] 09:52:09.100 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.100 os.go:Getenv(POSH_CURSOR_LINE) - 2.835µs
[DEBUG] 09:52:09.100 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.100 os.go:Getenv(POSH_CURSOR_COLUMN) - 2.412µs
[TRACE] 09:52:09.100 os.go:Flags() - 51ns
[TRACE] 09:52:09.100 os.go:Flags() - 32ns
[TRACE] 09:52:09.100 os.go:Flags() - 40ns
[DEBUG] 09:52:09.100 status.go:Init:53 → {{ .Code }}
[TRACE] 09:52:09.100 os.go:Flags() - 182ns
[TRACE] 09:52:09.100 os.go:GOOS() - 75ns
[DEBUG] 09:52:09.100 os.go:Pwd:339 → /home/<username>
[TRACE] 09:52:09.100 os.go:Pwd() - 14.408µs
[TRACE] 09:52:09.100 os.go:GOOS() - 53ns
[TRACE] 09:52:09.100 os.go:Pwd() - 175ns
[TRACE] 09:52:09.100 os.go:GOOS() - 62ns
[DEBUG] 09:52:09.100 segment.go:SetEnabled:115 → Segment: Status
[DEBUG] 09:52:09.100 segment.go:SetEnabled:115 → Segment: Root
[TRACE] 09:52:09.100 os.go:StatusCodes() - 156ns
[TRACE] 09:52:09.100 os.go:Flags() - 168ns
[TRACE] 09:52:09.100 os_unix.go:Root() - 1.449µs
[DEBUG] 09:52:09.100 text.go:Render:73 → Rendering template: {{ .Code }}
[TRACE] 09:52:09.100 os.go:Flags() - 88ns
[TRACE] 09:52:09.100 os.go:Flags() - 165ns
[TRACE] 09:52:09.100 os.go:Pwd() - 129ns
[TRACE] 09:52:09.100 os.go:Pwd() - 68ns
[TRACE] 09:52:09.100 os.go:GOOS() - 70ns
[TRACE] 09:52:09.100 os.go:GOOS() - 50ns
[TRACE] 09:52:09.100 os.go:Pwd() - 188ns
[DEBUG] 09:52:09.100 segment.go:SetEnabled:115 → Segment: Os
[DEBUG] 09:52:09.100 segment.go:SetEnabled:115 → Segment: Executiontime
[TRACE] 09:52:09.100 os.go:GOOS() - 61ns
[TRACE] 09:52:09.100 os.go:GOOS() - 30ns
[DEBUG] 09:52:09.100 os_unix.go:Platform:87 → arch
[DEBUG] 09:52:09.100 segment.go:SetEnabled:115 → Segment: Git
[DEBUG] 09:52:09.100 executiontime.go:Enabled:57 → always_enabled: true
[DEBUG] 09:52:09.100 os.go:Enabled:39 → display_distro_name: true
[TRACE] 09:52:09.100 os.go:ExecutionTime() - 77ns
[DEBUG] 09:52:09.100 os.go:Enabled:41 → arch
[DEBUG] 09:52:09.100 os_unix.go:IsWsl:35 → false
[DEBUG] 09:52:09.100 executiontime.go:Enabled:59 → threshold: 500.000000
[TRACE] 09:52:09.100 os_unix.go:Root() - 1.43µs
[TRACE] 09:52:09.100 os_unix.go:IsWsl() - 6.189µs
[TRACE] 09:52:09.100 os.go:Shell() - 80ns
[TRACE] 09:52:09.100 os_unix.go:IsWsl2() - 11.149µs
[TRACE] 09:52:09.100 os.go:StatusCodes() - 64ns
[DEBUG] 09:52:09.100 os_unix.go:IsWsl:35 → false
[TRACE] 09:52:09.100 os.go:GOOS() - 59ns
[TRACE] 09:52:09.100 os_unix.go:IsWsl() - 5.356µs
[TRACE] 09:52:09.100 os.go:Flags() - 49ns
[TRACE] 09:52:09.100 os.go:Pwd() - 62ns
[TRACE] 09:52:09.100 os.go:GOOS() - 31ns
[DEBUG] 09:52:09.100 segment.go:SetEnabled:115 → Segment: Battery
[DEBUG] 09:52:09.100 os_unix.go:IsWsl:35 → false
[TRACE] 09:52:09.100 os_unix.go:IsWsl() - 4.766µs
[DEBUG] 09:52:09.100 os.go:TemplateCache:792 → environment: [SHELL=/usr/bin/bash HISTCONTROL=erasedups:ignoredups:ignorespace POSH_PID=7876 HISTSIZE=500 LESS_TERMCAP_se=�[0m LESS_TERMCAP_so=�[01;44;33m CREDENTIALS_DIRECTORY=/run/credentials/getty@tty2.service MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA= NNN_FIFO=/tmp/nnn.fifo EDITOR=nvim XDG_SEAT=seat0 PWD=/home/<username> LOGNAME=<username> XDG_SESSION_TYPE=tty SYSTEMD_EXEC_PID=7415 MOTD_SHOWN=pam HOME=/home/<username> LANG=en_US.UTF-8 POSH_SHELL_VERSION=5.2.26(1)-release MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/system-getty.slice/getty@tty2.service/memory.pressure NNN_PLUG=d:dragdrop;z:autojump;p:preview-tui;r:renamer;e:suedit;k:pskill;i:imgview CONDA_PROMPT_MODIFIER=false CLICOLOR=1 INVOCATION_ID=6c9f6e5e414645fe9eaf718ea1ee979e XDG_SESSION_CLASS=user TERM=linux LESS_TERMCAP_mb=�[01;31m LESS_TERMCAP_me=�[0m LESS_TERMCAP_md=�[01;31m USER=<username> VISUAL=nvim SHLVL=2 LESS_TERMCAP_ue=�[0m LESS_TERMCAP_us=�[01;32m XDG_VTNR=2 XDG_SESSION_ID=5 POSH_THEME=/home/<username>/.config/oh-my-posh.minimal.omp.json XDG_RUNTIME_DIR=/run/user/1000 DEBUGINFOD_URLS=https://debuginfod.archlinux.org  PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/<username>/.local/bin:/home/<username>/.cargo/bin:/var/lib/flatpak/exports/bin:/.local/share/flatpak/exports/bin:/opt/nvim-linux64/bin:/home/<username>/.local/share/yabridge HISTFILESIZE=10000 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus MAIL=/var/spool/mail/<username> POWERLINE_COMMAND=oh-my-posh _=/usr/bin/oh-my-posh]
[DEBUG] 09:52:09.100 os.go:CommandPath:536 → /usr/bin/git
[TRACE] 09:52:09.100 os.go:CommandPath(git) - 30.611µs
[TRACE] 09:52:09.100 os.go:Pwd() - 101ns
[TRACE] 09:52:09.100 os.go:HasCommand(git) - 37.093µs
[DEBUG] 09:52:09.100 os_unix.go:IsWsl:35 → false
[TRACE] 09:52:09.100 os_unix.go:IsWsl() - 3.401µs
[TRACE] 09:52:09.100 os.go:Pwd() - 123ns
[TRACE] 09:52:09.100 os.go:GOOS() - 30ns
[TRACE] 09:52:09.100 os.go:GOOS() - 51ns
[TRACE] 09:52:09.100 os.go:GOOS() - 32ns
[TRACE] 09:52:09.100 os.go:GOOS() - 30ns
[TRACE] 09:52:09.100 os.go:GOOS() - 33ns
[TRACE] 09:52:09.100 os.go:GOOS() - 33ns
[TRACE] 09:52:09.100 os.go:Flags() - 245ns
[TRACE] 09:52:09.100 os.go:GOOS() - 33ns
[DEBUG] 09:52:09.100 os.go:ResolveSymlink:436 → /home/<username>
[TRACE] 09:52:09.100 os.go:ResolveSymlink(/home/<username>) - 13.764µs
[DEBUG] 09:52:09.100 os.go:User:477 → <username>
[TRACE] 09:52:09.100 os.go:User() - 8.64µs
[TRACE] 09:52:09.100 os.go:Pwd() - 230ns
[DEBUG] 09:52:09.100 os.go:Host:494 → arch-btw
[TRACE] 09:52:09.100 os.go:Host() - 8.144µs
[TRACE] 09:52:09.100 os.go:GOOS() - 34ns
[TRACE] 09:52:09.100 os.go:GOOS() - 196ns
[DEBUG] 09:52:09.100 os_unix.go:Platform:87 → arch
[DEBUG] 09:52:09.100 os.go:Getenv:309 → 2
[DEBUG] 09:52:09.100 segment.go:SetEnabled:115 → Segment: Path
[TRACE] 09:52:09.100 os.go:Getenv(SHLVL) - 3.333µs
[ERROR] 09:52:09.100 os.go:HasParentFilePath:700 → stat .git: no such file or directory
[DEBUG] 09:52:09.100 path.go:124 → display_cygpath: false
[TRACE] 09:52:09.100 os.go:HasParentFilePath(.git) - 58.501µs
[TRACE] 09:52:09.100 os.go:TemplateCache() - 122.708µs
[TRACE] 09:52:09.100 os.go:GOOS() - 109ns
[TRACE] 09:52:09.100 os.go:TemplateCache() - 122.832µs
[DEBUG] 09:52:09.100 git.go:shouldDisplay:284 → fetch_bare_info: false
[TRACE] 09:52:09.100 os.go:PathSeparator() - 99ns
[TRACE] 09:52:09.100 os.go:Pwd() - 95ns
[ERROR] 09:52:09.100 os_windows_nix.go:BatteryState:15 → unable to parse voltage_now
[TRACE] 09:52:09.100 os.go:Shell() - 101ns
[TRACE] 09:52:09.100 os_windows_nix.go:BatteryState() - 101.565µs
[TRACE] 09:52:09.100 os.go:Shell() - 52ns
[DEBUG] 09:52:09.100 battery.go:enabledWhileError:73 → display_error: false
[DEBUG] 09:52:09.100 path.go:replaceMappedLocations:517 → mapped_locations_enabled: true
[DEBUG] 09:52:09.100 path.go:replaceMappedLocations:518 → 
[DEBUG] 09:52:09.100 path.go:replaceMappedLocations:519 → 
[TRACE] 09:52:09.100 os.go:GOOS() - 72ns
[DEBUG] 09:52:09.100 path.go:replaceMappedLocations:520 → ~
[DEBUG] 09:52:09.100 path.go:replaceMappedLocations:525 → mapped_locations: map[]
[TRACE] 09:52:09.100 os.go:GOOS() - 135ns
[TRACE] 09:52:09.100 os.go:GOOS() - 31ns
[DEBUG] 09:52:09.100 path.go:makeFolderFormatMap:841 → NO DATA
[TRACE] 09:52:09.100 os.go:Pwd() - 92ns
[TRACE] 09:52:09.100 os.go:TemplateCache() - 163ns
[TRACE] 09:52:09.100 os.go:TemplateCache() - 273ns
[TRACE] 09:52:09.100 os.go:StackCount() - 69ns
[DEBUG] 09:52:09.100 status.go:Enabled:42 → always_enabled: true
[TRACE] 09:52:09.100 os_unix.go:DirIsWritable(/home/<username>) - 6.121µs
[TRACE] 09:52:09.100 os.go:TemplateCache() - 103ns
[TRACE] 09:52:09.100 os.go:TemplateCache() - 117ns
[DEBUG] 09:52:09.100 text.go:Render:73 → Rendering template:  {{ if .WSL }}WSL at {{ end }}{{.Icon}} |
[DEBUG] 09:52:09.100 text.go:Render:73 → Rendering template:  {{ if .Error}}X {{ .Code }} ({{ reason .Code }}){{ else }}:){{ end }} 
[DEBUG] 09:52:09.100 text.go:Render:73 → Rendering template:  {{ .Path }} 
[DEBUG] 09:52:09.100 text.go:Render:73 → Rendering template:  {{ .FormattedMs }} |
[TRACE] 09:52:09.101 os.go:TemplateCache() - 194ns
[TRACE] 09:52:09.101 os.go:TemplateCache() - 2.037µs
[TRACE] 09:52:09.101 os.go:TemplateCache() - 341ns
[TRACE] 09:52:09.101 os.go:Shell() - 167ns
[DEBUG] 09:52:09.101 text.go:Render:73 → Rendering template: plain
[DEBUG] 09:52:09.101 text.go:Render:73 → Rendering template: plain
[DEBUG] 09:52:09.101 text.go:Render:73 → Rendering template: powerline
[DEBUG] 09:52:09.102 text.go:Render:73 → Rendering template: plain
[DEBUG] 09:52:09.102 text.go:Render:73 → Rendering template: powerline
[DEBUG] 09:52:09.102 text.go:Render:73 → Rendering template: plain
[DEBUG] 09:52:09.102 text.go:Render:73 → Rendering template: {{ if gt .Code 0 }}red{{ end }}
[TRACE] 09:52:09.102 os.go:TemplateCache() - 254ns
[DEBUG] 09:52:09.102 text.go:Render:73 → Rendering template: diamond
[DEBUG] 09:52:09.102 text.go:Render:73 → Rendering template: {{ if gt .Code 0 }}red{{ end }}
[TRACE] 09:52:09.103 os.go:TemplateCache() - 196ns
[TRACE] 09:52:09.103 os.go:Shell() - 119ns
[TRACE] 09:52:09.103 os.go:Shell() - 79ns
[TRACE] 09:52:09.103 os.go:Flags() - 95ns
[TRACE] 09:52:09.103 os.go:Pwd() - 156ns
[TRACE] 09:52:09.103 os.go:Flags() - 156ns
[TRACE] 09:52:09.103 os.go:GOOS() - 90ns
[DEBUG] 09:52:09.103 segment.go:SetEnabled:115 → Segment: Time
[TRACE] 09:52:09.103 os.go:Pwd() - 149ns
[TRACE] 09:52:09.103 os.go:GOOS() - 48ns
[DEBUG] 09:52:09.103 time.go:Enabled:29 → 1:04:05 AM, _2
[DEBUG] 09:52:09.103 segment.go:SetEnabled:115 → Segment: Session
[TRACE] 09:52:09.103 os.go:TemplateCache() - 165ns
[DEBUG] 09:52:09.103 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.103 os.go:Getenv(SSH_CONNECTION) - 5.752µs
[DEBUG] 09:52:09.103 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.103 os.go:Getenv(SSH_CLIENT) - 3.279µs
[DEBUG] 09:52:09.103 os_unix.go:Platform:87 → arch
[DEBUG] 09:52:09.104 os.go:RunCommand:514 → NO DATA
[TRACE] 09:52:09.104 os.go:RunCommand(who am i) - 1.070317ms
[TRACE] 09:52:09.104 os.go:TemplateCache() - 144ns
[DEBUG] 09:52:09.104 text.go:Render:73 → Rendering template: {{ .CurrentDate | date .Format }} 
[DEBUG] 09:52:09.104 text.go:Render:73 → Rendering template:  {{ if .SSHSession }}SSH {{ end }}{{ .UserName }}@{{ .HostName }} <p:fg1>|</> 
[TRACE] 09:52:09.104 os.go:TemplateCache() - 280ns
[TRACE] 09:52:09.104 os.go:TemplateCache() - 139ns
[DEBUG] 09:52:09.104 text.go:Render:73 → Rendering template: diamond
[DEBUG] 09:52:09.104 text.go:Render:73 → Rendering template: plain
[DEBUG] 09:52:09.105 os_unix.go:TerminalWidth:80 → terminal width: 240
[TRACE] 09:52:09.105 os_unix.go:TerminalWidth() - 858.521µs
[TRACE] 09:52:09.105 os.go:Shell() - 92ns
[TRACE] 09:52:09.105 os.go:Shell() - 34ns
[TRACE] 09:52:09.105 os.go:Flags() - 64ns
[TRACE] 09:52:09.105 os.go:Pwd() - 143ns
[TRACE] 09:52:09.105 os.go:GOOS() - 71ns
[DEBUG] 09:52:09.105 segment.go:SetEnabled:115 → Segment: Path
[DEBUG] 09:52:09.105 path.go:124 → display_cygpath: false
[TRACE] 09:52:09.105 os.go:GOOS() - 40ns
[TRACE] 09:52:09.105 os.go:PathSeparator() - 56ns
[TRACE] 09:52:09.105 os.go:Pwd() - 80ns
[TRACE] 09:52:09.105 os.go:Shell() - 32ns
[TRACE] 09:52:09.105 os.go:Shell() - 35ns
[DEBUG] 09:52:09.105 path.go:replaceMappedLocations:517 → mapped_locations_enabled: true
[DEBUG] 09:52:09.105 path.go:replaceMappedLocations:518 → 
[DEBUG] 09:52:09.105 path.go:replaceMappedLocations:519 → 
[TRACE] 09:52:09.105 os.go:GOOS() - 31ns
[DEBUG] 09:52:09.105 path.go:replaceMappedLocations:520 → ~
[DEBUG] 09:52:09.105 path.go:replaceMappedLocations:525 → mapped_locations: map[]
[TRACE] 09:52:09.105 os.go:GOOS() - 52ns
[TRACE] 09:52:09.105 os.go:GOOS() - 51ns
[DEBUG] 09:52:09.105 path.go:makeFolderFormatMap:841 → NO DATA
[TRACE] 09:52:09.105 os.go:Pwd() - 51ns
[TRACE] 09:52:09.105 os.go:TemplateCache() - 135ns
[TRACE] 09:52:09.105 os.go:StackCount() - 68ns
[TRACE] 09:52:09.105 os_unix.go:DirIsWritable(/home/<username>) - 4.677µs
[TRACE] 09:52:09.105 os.go:TemplateCache() - 74ns
[DEBUG] 09:52:09.105 text.go:Render:73 → Rendering template: {{ .Shell }}>
[TRACE] 09:52:09.105 os.go:TemplateCache() - 158ns
[TRACE] 09:52:09.105 os.go:Shell() - 55ns
[DEBUG] 09:52:09.105 text.go:Render:73 → Rendering template: diamond
[TRACE] 09:52:09.105 os.go:Shell() - 36ns
[TRACE] 09:52:09.105 os.go:Shell() - 35ns
[TRACE] 09:52:09.105 os.go:Shell() - 31ns
[TRACE] 09:52:09.105 os.go:Shell() - 31ns
[DEBUG] 09:52:09.105 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.105 os.go:Getenv(OMP_CACHE_DIR) - 3.549µs
[DEBUG] 09:52:09.105 os.go:Getenv:309 → NO DATA
[TRACE] 09:52:09.105 os.go:Getenv(XDG_CACHE_HOME) - 2.832µs
[TRACE] 09:52:09.105 os_unix.go:CachePath() - 25.542µs
[TRACE] 09:52:09.105 os.go:Flags() - 50ns
@ThePython10110 ThePython10110 added the 🐛 bug Something isn't working label Jul 26, 2024
Repository owner locked and limited conversation to collaborators Jul 26, 2024
@JanDeDobbeleer JanDeDobbeleer converted this issue into discussion #5355 Jul 26, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants