Starship: zsh starship doesn't use config file.

Created on 24 Jun 2020  ยท  4Comments  ยท  Source: starship/starship

Current Behavior

None of my starship config symbols show up. (Like the lambda etc.)

Expected Behavior

The symbols and customizations defined in my starship config file at .config/starship.toml to have an effect on what my prompt looks like.

Additional context/Screenshots

I use this exact config file on another machine and it works great. A lot of the symbols won't show up well on web, but I can see them in my terminal with the proper fonts installed. The only difference I can see between one setup and the other is that the working one uses bash while the broken one uses zsh. Other than that they are identical as far as I can tell. I've tried setting the starship config file to another path with the same contents but to no avail.

Possible Solution

=\ I'm stumped sorry.

Environment

  • Starship version: 0.41.3
  • zsh version: zsh 5.7.1 (x86_64-apple-darwin19.0)
  • Operating system: Mac OS 10.15.5
  • Terminal emulator: iTerm.app 3.3.11

Relevant Shell Configuration

source ~/.aliases


alias ls='lsd'
alias ll='ls -l'
alias la='ll -a'
alias lt='lsd --tree'

export STARSHIP_CONFIG=~/.config/starship.toml ## Tried with and without this line
export PATH=/Users/mecargo/bin:$PATH

eval "$(starship init zsh)"

Starship Configuration

[character]
symbol = "ฮป "

[battery]
full_symbol = "๏•ธ"
charging_symbol = "๏–ƒ"
discharging_symbol = "๏–‚"

[memory_usage]
disabled = false
show_percentage = true
show_swap = true
threshold = -1
symbol = " "
separator = "/"
style = "bold dimmed green"

[aws]
symbol = "๎Œฝ "

[conda]
symbol = "๏„Œ "

[git_branch]
symbol = "๏˜ "

[golang]
symbol = "๎˜ง "

[hg_branch]
symbol = "๏˜ "

[java]
symbol = "๎‰– "

[memory_usage]
symbol = "๏กš "

[nodejs]
symbol = "๎‰ "

[package]
symbol = "๏ฃ– "

[php]
symbol = "๎˜ˆ "

[python]
symbol = "๎˜† "

[ruby]
symbol = "๎ˆพ "

[rust]
symbol = "๏€“ "

[elixir]
symbol = "๎˜ญ "
๐Ÿ› bug

All 4 comments

Hey @alex0112 ๐Ÿ‘‹

Hmm... Everything in your configuration looks correct.

Could you please try running the following and sharing the log output with us:

RUST_LOG=starship starship prompt
~
โœฆ2 โฏ RUST_LOG=starship starship prompt
 DEBUG starship::config > STARSHIP_CONFIG is set:
/Users/me/.config/starship.toml
 TRACE starship::config > Config file content:
[character]
symbol = "ฮป "

[battery]
full_symbol = "๏•ธ"
charging_symbol = "๏–ƒ"
discharging_symbol = "๏–‚"

[memory_usage]
disabled = false
show_percentage = true
show_swap = true
threshold = -1
symbol = " "
separator = "/"
style = "bold dimmed green"

[aws]
symbol = "๎Œฝ "

[conda]
symbol = "๏„Œ "

[git_branch]
symbol = "๏˜ "

[golang]
symbol = "๎˜ง "

[hg_branch]
symbol = "๏˜ "

[java]
symbol = "๎‰– "

[memory_usage]
symbol = "๏กš "

[nodejs]
symbol = "๎‰ "

[package]
symbol = "๏ฃ– "

[php]
symbol = "๎˜ˆ "

[python]
symbol = "๎˜† "

[ruby]
symbol = "๎ˆพ "

[rust]
symbol = "๏€“ "

[elixir]
symbol = "๎˜ญ "
 TRACE starship::config > No config found for "username"
 TRACE starship::config > No config found for "hostname"
 TRACE starship::config > No config found for "singularity"
 TRACE starship::config > No config found for "kubernetes"
 TRACE starship::config > No config found for "directory"
 TRACE starship::config > No config found for "git_branch"
 TRACE starship::config > No config found for "git_commit"
 TRACE starship::config > No config found for "git_state"
 TRACE starship::config > No config found for "git_status"
 TRACE starship::config > No config found for "hg_branch"
 TRACE starship::config > No config found for "docker_context"
 TRACE starship::config > No config found for "package"
 TRACE starship::config > No config found for "dotnet"
 TRACE starship::config > No config found for "elixir"
 TRACE starship::config > No config found for "elm"
 TRACE starship::config > No config found for "erlang"
 TRACE starship::config > No config found for "golang"
 TRACE starship::config > No config found for "haskell"
 TRACE starship::config > No config found for "java"
 TRACE starship::config > No config found for "julia"
 TRACE starship::config > No config found for "nodejs"
 TRACE starship::config > No config found for "php"
 TRACE starship::config > No config found for "python"
 TRACE starship::config > No config found for "ruby"
 TRACE starship::config > No config found for "rust"
 TRACE starship::config > No config found for "terraform"
 TRACE starship::config > No config found for "nix_shell"
 TRACE starship::config > No config found for "conda"
 TRACE starship::config > No config found for "memory_usage"
 TRACE starship::config > No config found for "aws"
 TRACE starship::config > No config found for "env_var"
 TRACE starship::config > No config found for "crystal"
 TRACE starship::config > No config found for "cmd_duration"
 TRACE starship::config > No config found for "line_break"
 TRACE starship::config > No config found for "jobs"
 TRACE starship::config > No config found for "battery"
 TRACE starship::config > No config found for "time"
 TRACE starship::config > No config found for "character"
 TRACE starship::config > No config found for "directory"
 TRACE starship::config > No config found for "memory_usage"
 TRACE starship::config > No config found for "git_branch"
 TRACE starship::config             > No config found for "aws"
 TRACE starship::config > No config found for "git_commit"
 TRACE starship::utils  > Executing command "id" with args ["-u"]
 DEBUG starship::modules::directory > Current directory: "/Users/me"
 TRACE starship::config             > No config found for "hostname"
 TRACE starship::config             > No config found for "env_var"
 TRACE starship::config             > No config found for "git_state"
 TRACE starship::config             > No config found for "line_break"
 TRACE starship::context            > Building HashSets of directory files, folders and extensions took 649ยตs
 TRACE starship::utils              > stdout: "503\n"
 TRACE starship::config             > No config found for "jobs"
 TRACE starship::utils              > stderr: ""
 TRACE starship::config             > No config found for "cmd_duration"
 TRACE starship::config             > No config found for "python"
 TRACE starship::config             > No config found for "docker_context"
 TRACE starship::config             > No config found for "time"
 TRACE starship::utils              > exit code: "Some(0)"
 TRACE starship::config             > No config found for "package"
 TRACE starship::config             > No config found for "character"
 TRACE starship::config             > No config found for "nix_shell"
 TRACE starship::config             > No config found for "username"
 DEBUG starship::modules::battery   > Battery found: Battery { impl: MacOSDevice { source: PowerSource { io_object: IoObject(8963) } }, vendor: Some("SMP"), model: Some("bq20z451"), serial_number: Some("D867444A1V6HDWCB1"), technology: Unknown, state: Discharging, capacity: 0.908832, temperature: Some(303.66 K^1), percentage: 0.79013366, cycle_count: Some(167), energy: 208022.69 m^2 kg^1 s^-2, energy_full: 263275.3 m^2 kg^1 s^-2, energy_full_design: 289685.34 m^2 kg^1 s^-2, energy_rate: 11.148985 m^2 kg^1 s^-3, voltage: 12.066001 m^2 kg^1 s^-3 A^-1, time_to_full: None, time_to_empty: Some(18660.0 s^1) }
 DEBUG starship::modules::battery   > Battery status: BatteryStatus { percentage: 79.01337, state: Discharging }
 TRACE starship::config             > No config found for "battery"

%{%}~%{%}
%{%}โฏ%{%} %
~
โœฆ2 โฏ

It's hard to spot but I think the problem is you have [memory_usage] defined twice in the config file which is invalid in toml. I'll open a PR to add some additional logging around this to make it easier to spot these errors in the future.

That was the problem. Thanks for the quick reply!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cfal picture cfal  ยท  3Comments

nerosnm picture nerosnm  ยท  4Comments

amerry picture amerry  ยท  3Comments

matchai picture matchai  ยท  4Comments

vandrw picture vandrw  ยท  3Comments