Strange error when trying to load OMP (ubuntu, bash) #5313
-
Code of Conduct
What happened?A weird command not found error appears when I start a terminal, and the error seems to be triggered when OMP attempts to load. The error is:
ThemeThis is the end of my if ["$(cat /proc/$PPID/comm)" != "cockpit-bridge" ]; then
eval "$(oh-my-posh init bash --config $(brew --prefix oh-my-posh)/themes/montys.omp.json)"
fi The if statement surrounding the OMP command is to prevent it from activating when using Cockpit (https://cockpit-project.org), since Cockpit's font can't be changed to use Nerd Fonts. What OS are you seeing the problem on?Linux Which shell are you using?bash Log outputVersion: 21.27.0
Shell: bash
Prompt:
jaherron �]8;;file:/home/jaherron�\~�]8;;�\
Segments:
ConsoleTitle(true) - 1 ms
Session(true) - 0 ms
Path(true) - 0 ms
Status(true) - 1 ms
Node(false) - 0 ms
Go(false) - 0 ms
Python(false) - 0 ms
Shell(false) - 0 ms
Time(false) - 0 ms
Run duration: 7.800995ms
Cache path: /home/jaherron/.cache/oh-my-posh
Config path: no --config set, using default built-in configuration
Logs:
[DEBUG] 18:02:50.147 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.147 os.go:Getenv(OMP_CACHE_DIR) - 99.595µs
[DEBUG] 18:02:50.147 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.147 os.go:Getenv(XDG_CACHE_HOME) - 6.803µs
[TRACE] 18:02:50.147 os_unix.go:CachePath() - 153.101µs
[DEBUG] 18:02:50.147 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.147 os.go:Getenv(POSH_THEME) - 8.944µs
[DEBUG] 18:02:50.147 os.go:resolveConfigPath:247 → No config set, fallback to default config
[TRACE] 18:02:50.147 os.go:resolveConfigPath() - 33.898µs
[TRACE] 18:02:50.147 os.go:Init() - 363.175µs
[TRACE] 18:02:50.147 os.go:Flags() - 156ns
[DEBUG] 18:02:50.147 load.go:loadConfig:55 → no config file specified, using default
[TRACE] 18:02:50.147 load.go:loadConfig() - 65.108µs
[TRACE] 18:02:50.147 os.go:Flags() - 71ns
[DEBUG] 18:02:50.147 debug.go:44 → Terminal shell: %s shell
[DEBUG] 18:02:50.147 debug.go:44 → Terminal program: %s vscode
[DEBUG] 18:02:50.147 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.147 os.go:Getenv(OMP_CACHE_DISABLED) - 6.331µs
[DEBUG] 18:02:50.147 os.go:Shell:581 → no shell name provided in flags, trying to detect it
[DEBUG] 18:02:50.149 os.go:Shell:589 → process name: bash
[TRACE] 18:02:50.149 os.go:Shell() - 1.363635ms
[DEBUG] 18:02:50.149 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.149 os.go:Getenv(POSH_SHELL_VERSION) - 6.702µs
[DEBUG] 18:02:50.149 debug.go:PrintDebug:23 → Segment: Title
[DEBUG] 18:02:50.149 text.go:Render:73 → Rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 18:02:50.149 os_unix.go:Root() - 908ns
[TRACE] 18:02:50.149 os.go:Shell() - 245ns
[TRACE] 18:02:50.149 os.go:StatusCodes() - 159ns
[DEBUG] 18:02:50.149 os_unix.go:IsWsl:35 → false
[TRACE] 18:02:50.149 os_unix.go:IsWsl() - 16.259µs
[DEBUG] 18:02:50.149 os.go:TemplateCache:789 → environment: [SHELL=/bin/bash COLORTERM=truecolor TERM_PROGRAM_VERSION=1.91.1 DOTNET_ROOT=/usr/lib/dotnet HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew PWD=/home/jaherron LOGNAME=jaherron XDG_SESSION_TYPE=tty MANPATH=/home/linuxbrew/.linuxbrew/share/man:/home/linuxbrew/.linuxbrew/share/man:/home/linuxbrew/.linuxbrew/share/man::: VSCODE_GIT_ASKPASS_NODE=/home/jaherron/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/node HOME=/home/jaherron LANG=en_US.UTF-8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90: VIRTUAL_ENV=/home/jaherron/code/python/.venv SSL_CERT_DIR=/usr/lib/ssl/certs GIT_ASKPASS=/home/jaherron/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/extensions/git/dist/askpass.sh SSH_CONNECTION=100.87.5.22 60593 100.125.29.28 22 DOTNET_BUNDLE_EXTRACT_BASE_DIR=/home/jaherron/.cache/dotnet_bundle_extract INFOPATH=/home/linuxbrew/.linuxbrew/share/info:/home/linuxbrew/.linuxbrew/share/info:/home/linuxbrew/.linuxbrew/share/info: VSCODE_GIT_ASKPASS_EXTRA_ARGS= LESSCLOSE=/usr/bin/lesspipe %s %s XDG_SESSION_CLASS=user TERM=xterm-256color LESSOPEN=| /usr/bin/lesspipe %s USER=jaherron VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-2ea1ae88fa.sock HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar SHLVL=2 HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew XDG_SESSION_ID=1037 VIRTUAL_ENV_PROMPT=(.venv) XDG_RUNTIME_DIR=/run/user/1000 SSL_CERT_FILE=/usr/lib/ssl/cert.pem PS1=\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ SSH_CLIENT=100.87.5.22 60593 22 DEBUGINFOD_URLS=https://debuginfod.ubuntu.com VSCODE_GIT_ASKPASS_MAIN=/home/jaherron/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/extensions/git/dist/askpass-main.js XDG_DATA_DIRS=/usr/share/gnome:/home/jaherron/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop BROWSER=/home/jaherron/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/bin/helpers/browser.sh PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/jaherron/.vscode-server/extensions/ms-python.python-2024.6.0/python_files/deactivate/bash:/home/jaherron/code/python/.venv/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/jaherron/.vscode-server/extensions/ms-python.python-2024.6.0/python_files/deactivate/bash:/home/jaherron/code/python/.venv/bin:/home/jaherron/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/bin/remote-cli:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/jaherron/.dotnet/tools:/scripts:/home/jaherron/node_modules:/snap/bin:/scripts:/home/jaherron/node_modules:/snap/bin:/scripts:/home/jaherron/node_modules:/snap/bin:/scripts:/home/jaherron/node_modules:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus TERM_PROGRAM=vscode VSCODE_IPC_HOOK_CLI=/run/user/1000/vscode-ipc-dfd2113c-798f-4c7b-8eb5-470957ce3d26.sock _=/home/linuxbrew/.linuxbrew/bin/oh-my-posh OLDPWD=/home/jaherron/code/python]
[TRACE] 18:02:50.149 os.go:GOOS() - 187ns
[DEBUG] 18:02:50.149 os.go:Pwd:336 → /home/jaherron
[TRACE] 18:02:50.149 os.go:Pwd() - 47.558µs
[DEBUG] 18:02:50.149 os_unix.go:IsWsl:35 → false
[TRACE] 18:02:50.149 os_unix.go:IsWsl() - 17.293µs
[TRACE] 18:02:50.149 os.go:GOOS() - 69ns
[TRACE] 18:02:50.149 os.go:GOOS() - 70ns
[TRACE] 18:02:50.149 os.go:GOOS() - 64ns
[TRACE] 18:02:50.149 os.go:GOOS() - 65ns
[TRACE] 18:02:50.149 os.go:GOOS() - 66ns
[TRACE] 18:02:50.149 os.go:GOOS() - 67ns
[TRACE] 18:02:50.150 os.go:GOOS() - 67ns
[TRACE] 18:02:50.150 os.go:GOOS() - 66ns
[TRACE] 18:02:50.150 os.go:GOOS() - 68ns
[TRACE] 18:02:50.150 os.go:GOOS() - 68ns
[DEBUG] 18:02:50.150 os.go:User:474 → jaherron
[TRACE] 18:02:50.150 os.go:User() - 6.903µs
[DEBUG] 18:02:50.150 os.go:Host:491 → vintage
[TRACE] 18:02:50.150 os.go:Host() - 9.446µs
[TRACE] 18:02:50.150 os.go:GOOS() - 73ns
[DEBUG] 18:02:50.150 os_unix.go:Platform:87 → ubuntu
[DEBUG] 18:02:50.150 os.go:Getenv:306 → 2
[TRACE] 18:02:50.150 os.go:Getenv(SHLVL) - 6.85µs
[TRACE] 18:02:50.150 os.go:TemplateCache() - 380.598µs
[TRACE] 18:02:50.150 os.go:Shell() - 143ns
[DEBUG] 18:02:50.150 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.150 os.go:Getenv(POSH_CURSOR_LINE) - 6.253µs
[DEBUG] 18:02:50.150 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.150 os.go:Getenv(POSH_CURSOR_COLUMN) - 5.19µs
[TRACE] 18:02:50.150 os.go:Flags() - 165ns
[TRACE] 18:02:50.150 os.go:Flags() - 68ns
[TRACE] 18:02:50.150 os.go:Flags() - 63ns
[DEBUG] 18:02:50.150 status.go:Init:53 → {{ .Code }}
[TRACE] 18:02:50.150 os.go:Pwd() - 270ns
[TRACE] 18:02:50.150 os.go:GOOS() - 122ns
[DEBUG] 18:02:50.150 segment.go:SetEnabled:115 → Segment: Status
[TRACE] 18:02:50.150 os.go:StatusCodes() - 132ns
[DEBUG] 18:02:50.150 text.go:Render:73 → Rendering template: {{ .Code }}
[TRACE] 18:02:50.150 os.go:Flags() - 3.043µs
[TRACE] 18:02:50.150 os.go:Pwd() - 434ns
[TRACE] 18:02:50.150 os.go:GOOS() - 168ns
[DEBUG] 18:02:50.150 segment.go:SetEnabled:115 → Segment: Path
[DEBUG] 18:02:50.150 path.go:124 → display_cygpath: false
[TRACE] 18:02:50.150 os.go:GOOS() - 88ns
[TRACE] 18:02:50.150 os.go:PathSeparator() - 156ns
[TRACE] 18:02:50.150 os.go:Pwd() - 157ns
[TRACE] 18:02:50.150 os.go:Shell() - 295ns
[TRACE] 18:02:50.150 os.go:Shell() - 130ns
[TRACE] 18:02:50.150 os.go:Flags() - 504ns
[DEBUG] 18:02:50.150 path.go:replaceMappedLocations:517 → mapped_locations_enabled: true
[DEBUG] 18:02:50.150 path.go:replaceMappedLocations:518 →
[DEBUG] 18:02:50.150 path.go:replaceMappedLocations:519 →
[TRACE] 18:02:50.150 os.go:Pwd() - 388ns
[TRACE] 18:02:50.150 os.go:GOOS() - 68ns
[DEBUG] 18:02:50.150 path.go:replaceMappedLocations:520 → ~
[DEBUG] 18:02:50.150 segment.go:SetEnabled:115 → Segment: Session
[DEBUG] 18:02:50.150 path.go:replaceMappedLocations:525 → mapped_locations: map[]
[DEBUG] 18:02:50.150 os.go:Getenv:306 → 100.87.5.22 60593 100.125.29.28 22
[TRACE] 18:02:50.150 os.go:Getenv(SSH_CONNECTION) - 22.587µs
[TRACE] 18:02:50.150 os.go:TemplateCache() - 725ns
[TRACE] 18:02:50.150 os.go:Flags() - 635ns
[TRACE] 18:02:50.150 os.go:GOOS() - 124ns
[TRACE] 18:02:50.150 os.go:GOOS() - 71ns
[TRACE] 18:02:50.150 os.go:Pwd() - 2.869µs
[DEBUG] 18:02:50.150 path.go:makeFolderFormatMap:841 → NO DATA
[TRACE] 18:02:50.150 os.go:GOOS() - 292ns
[TRACE] 18:02:50.150 os.go:Pwd() - 110ns
[TRACE] 18:02:50.150 os.go:TemplateCache() - 529ns
[TRACE] 18:02:50.150 os.go:StackCount() - 176ns
[DEBUG] 18:02:50.150 segment.go:SetEnabled:115 → Segment: Git
[TRACE] 18:02:50.150 os_unix.go:DirIsWritable(/home/jaherron) - 13.469µs
[TRACE] 18:02:50.150 os.go:TemplateCache() - 172ns
[DEBUG] 18:02:50.150 os_unix.go:IsWsl:35 → false
[TRACE] 18:02:50.150 os_unix.go:IsWsl() - 14.011µs
[TRACE] 18:02:50.150 os_unix.go:IsWsl2() - 26.295µs
[TRACE] 18:02:50.150 os.go:GOOS() - 149ns
[TRACE] 18:02:50.150 os.go:TemplateCache() - 549ns
[TRACE] 18:02:50.151 os.go:Flags() - 361ns
[DEBUG] 18:02:50.151 status.go:Enabled:42 → always_enabled: true
[TRACE] 18:02:50.151 os.go:TemplateCache() - 519ns
[TRACE] 18:02:50.151 os.go:Pwd() - 434ns
[TRACE] 18:02:50.151 os.go:GOOS() - 157ns
[DEBUG] 18:02:50.151 segment.go:SetEnabled:115 → Segment: Root
[TRACE] 18:02:50.151 os_unix.go:Root() - 1.317µs
[DEBUG] 18:02:50.151 os.go:CommandPath:533 → /usr/bin/git
[TRACE] 18:02:50.151 os.go:CommandPath(git) - 766.663µs
[TRACE] 18:02:50.151 os.go:HasCommand(git) - 782.736µs
[TRACE] 18:02:50.151 os.go:Pwd() - 377ns
[DEBUG] 18:02:50.151 os.go:ResolveSymlink:433 → /home/jaherron
[TRACE] 18:02:50.151 os.go:ResolveSymlink(/home/jaherron) - 46.684µs
[ERROR] 18:02:50.151 os.go:HasParentFilePath:697 → stat .git: no such file or directory
[TRACE] 18:02:50.152 os.go:HasParentFilePath(.git) - 223.022µs
[DEBUG] 18:02:50.152 git.go:shouldDisplay:284 → fetch_bare_info: false
[DEBUG] 18:02:50.152 text.go:Render:73 → Rendering template: {{ if gt .Code 0 }}{{ else }}{{ end }}
[DEBUG] 18:02:50.152 text.go:Render:73 → Rendering template: {{ path .Path .Location }}
[DEBUG] 18:02:50.152 text.go:Render:73 → Rendering template: {{ if .SSHSession }} {{ end }}{{ .UserName }}
[TRACE] 18:02:50.153 os.go:TemplateCache() - 366ns
[TRACE] 18:02:50.154 os.go:TemplateCache() - 481ns
[TRACE] 18:02:50.154 os.go:TemplateCache() - 663ns
[DEBUG] 18:02:50.154 text.go:Render:73 → Rendering template: powerline
[DEBUG] 18:02:50.154 text.go:Render:73 → Rendering template: powerline
[DEBUG] 18:02:50.154 text.go:Render:73 → Rendering template: diamond
[DEBUG] 18:02:50.154 text.go:Render:73 → Rendering template: powerline
[DEBUG] 18:02:50.154 text.go:Render:73 → Rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 18:02:50.154 os.go:TemplateCache() - 292ns
[DEBUG] 18:02:50.154 text.go:Render:73 → Rendering template: diamond
[DEBUG] 18:02:50.154 text.go:Render:73 → Rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 18:02:50.154 os.go:TemplateCache() - 180ns
[TRACE] 18:02:50.154 os.go:Shell() - 121ns
[TRACE] 18:02:50.154 os.go:Shell() - 70ns
[TRACE] 18:02:50.154 os.go:Flags() - 148ns
[TRACE] 18:02:50.154 os.go:Shell() - 58ns
[TRACE] 18:02:50.154 os.go:Shell() - 64ns
[DEBUG] 18:02:50.155 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.155 os.go:Getenv(OMP_CACHE_DIR) - 6.588µs
[DEBUG] 18:02:50.155 os.go:Getenv:306 → NO DATA
[TRACE] 18:02:50.155 os.go:Getenv(XDG_CACHE_HOME) - 4.712µs
[TRACE] 18:02:50.155 os_unix.go:CachePath() - 38.894µs
[TRACE] 18:02:50.155 os.go:Flags() - 70ns |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@jaherron oh-my-posh doesn't run the node command anywhere for the shell to interpret so that error can't come from us. |
Beta Was this translation helpful? Give feedback.
-
Problem fixed by copying bashrc file from another Ubuntu machine where OMP was working properly. I have no idea how i kludged the bashrc file on the machine I made the issue for. Closing as resolved. |
Beta Was this translation helpful? Give feedback.
Problem fixed by copying bashrc file from another Ubuntu machine where OMP was working properly. I have no idea how i kludged the bashrc file on the machine I made the issue for. Closing as resolved.