JanDeDobbeleer / oh-my-posh

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

Doesn't work on MacOs Monterey with M1 chip #1953

Closed atrost closed 2 years ago

atrost commented 2 years ago

Code of Conduct

What happened?

Follow the installation instructions. brew tap jandedobbeleer/oh-my-posh brew install oh-my-posh

Set to use the default theme. Add the following line to ~./bash_profile eval "$(oh-my-posh prompt init bash)"

Open a new window terminal and inspect the new terminal. Instead of showing the path it displays ??. The prompt is not readable or usable in any way. You might see something like that: [?] atrost [?][?][?]~[?][?][?]

(see the diagnostic output below).

Please advise.

Theme

default theme

What OS are you seeing the problem on?

macOS

Which shell are you using?

bash

Log output

oh-my-posh prompt debug                                                                                                                      in bash at 14:24:28

Version: 7.43.1

Segments:

ConsoleTitle(true) -   0 ms - bash in ~
session(true)  -   0 ms -  atrost 
path(true)     -   0 ms -   ~ 
git(false)     -   0 ms - 
root(false)    -   0 ms - 
exit(true)     -   0 ms -   
node(false)    -   0 ms - 
go(false)      -   0 ms - 
python(false)  -   0 ms - 
shell(true)    -   0 ms - in bash 
time(true)     -   0 ms - at 14:24:58

Run duration: 1.717792ms

Cache path: /Users/atrost

Logs:

2022/03/20 14:24:58 Flags duration: 42ns, args: 
2022/03/20 14:24:58 Flags duration: 42ns, args: 
2022/03/20 14:24:58 debug: Getenv

2022/03/20 14:24:58 Getenv duration: 1.375µs, args: OMP_CACHE_DISABLED
2022/03/20 14:24:58 Root duration: 500ns, args: 
2022/03/20 14:24:58 Shell duration: 166.916µs, args: 
2022/03/20 14:24:58 ErrorCode duration: 42ns, args: 
2022/03/20 14:24:58 debug: Getenv

2022/03/20 14:24:58 Getenv duration: 1µs, args: WSL_DISTRO_NAME
2022/03/20 14:24:58 IsWsl duration: 2.292µs, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 8.917µs, args: 
2022/03/20 14:24:58 PathSeparator duration: 41ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 42ns, args: 
2022/03/20 14:24:58 User duration: 125ns, args: 
2022/03/20 14:24:58 Host duration: 3.541µs, args: 
2022/03/20 14:24:58 GOOS duration: 0s, args: 
2022/03/20 14:24:58 TemplateCache duration: 203.25µs, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 625ns, args: 
2022/03/20 14:24:58 debug: Getenv

2022/03/20 14:24:58 Getenv duration: 708ns, args: SSH_CONNECTION
2022/03/20 14:24:58 debug: Getenv

2022/03/20 14:24:58 Getenv duration: 500ns, args: SSH_CLIENT
2022/03/20 14:24:58 TemplateCache duration: 42ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 875ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 584ns, args: 
2022/03/20 14:24:58 Flags duration: 42ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 583ns, args: 
2022/03/20 14:24:58 GOOS duration: 0s, args: 
2022/03/20 14:24:58 GOOS duration: 41ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 42ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 0s, args: 
2022/03/20 14:24:58 PathSeparator duration: 42ns, args: 
2022/03/20 14:24:58 GOOS duration: 42ns, args: 
2022/03/20 14:24:58 debug: Getenv

2022/03/20 14:24:58 Getenv duration: 500ns, args: WSL_DISTRO_NAME
2022/03/20 14:24:58 IsWsl duration: 1.458µs, args: 
2022/03/20 14:24:58 StackCount duration: 83ns, args: 
2022/03/20 14:24:58 TemplateCache duration: 0s, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 625ns, args: 
2022/03/20 14:24:58 debug: Getenv

2022/03/20 14:24:58 Getenv duration: 875ns, args: WSL_DISTRO_NAME
2022/03/20 14:24:58 IsWsl duration: 1.916µs, args: 
2022/03/20 14:24:58 GOOS duration: 41ns, args: 
2022/03/20 14:24:58 HasCommand duration: 38.25µs, args: git
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 500ns, args: 
2022/03/20 14:24:58 error: HasParentFilePath
stat /.git: no such file or directory
2022/03/20 14:24:58 HasParentFilePath duration: 6.292µs, args: .git
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 500ns, args: 
2022/03/20 14:24:58 Root duration: 250ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 458ns, args: 
2022/03/20 14:24:58 ErrorCode duration: 42ns, args: 
2022/03/20 14:24:58 TemplateCache duration: 0s, args: 
2022/03/20 14:24:58 TemplateCache duration: 41ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 583ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 459ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 500ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 459ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 459ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 625ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 458ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 42ns, args: 
2022/03/20 14:24:58 HasFiles duration: 84.291µs, args: *.py
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 500ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 42ns, args: 
2022/03/20 14:24:58 HasFiles duration: 53.459µs, args: *.ipynb
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 458ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 41ns, args: 
2022/03/20 14:24:58 HasFiles duration: 3.667µs, args: pyproject.toml
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 458ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 42ns, args: 
2022/03/20 14:24:58 HasFiles duration: 3.125µs, args: venv.bak
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 417ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 0s, args: 
2022/03/20 14:24:58 HasFiles duration: 3.125µs, args: venv
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 459ns, args: 
2022/03/20 14:24:58 PathSeparator duration: 0s, args: 
2022/03/20 14:24:58 HasFiles duration: 2.791µs, args: .venv
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 459ns, args: 
2022/03/20 14:24:58 Shell duration: 42ns, args: 
2022/03/20 14:24:58 TemplateCache duration: 41ns, args: 
2022/03/20 14:24:58 debug: Pwd
/Users/atrost
2022/03/20 14:24:58 Pwd duration: 583ns, args: 
2022/03/20 14:24:58 TemplateCache duration: 0s, args: 
2022/03/20 14:24:58 debug: Getenv

2022/03/20 14:24:58 Getenv duration: 5.291µs, args: XDG_CACHE_HOME
2022/03/20 14:24:58 CachePath duration: 8.375µs, args:
JanDeDobbeleer commented 2 years ago

@atrost the default terminal is discouraged if you don't know how to set it up (also mentioned in the docs, I have no idea why it doesn't work as every other terminal in the world does). As for boxes with question marks, make sure to set your terminal (preferably iTerm2 or Hyper) to use a Nerd Font.

atrost commented 2 years ago

@JanDeDobbeleer Installing Nerd font didn't help much (only on the ride hand side of the terminal it correctly displays the terminal name and current time: in bash at 15:19:10 but the prompt itself is still the same - boxes with ??)

I intentionally avoiding iTerm and Hyper due to they are both resource-intensive (some heavy rails env). Would switching to ZSH terminal help?

Thanks

JanDeDobbeleer commented 2 years ago

@atrost did you set the font also in terminal? A screenshot might help me point you in the right direction 🙏🏻

JanDeDobbeleer commented 2 years ago

@atrost I tried again on my MBP and can conclude that Terminal is by far the worst ever terminal created. Even Microsoft stepped up their game. I can't possibly support this horrible experience.

github-actions[bot] commented 8 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.