starship / starship

☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
https://starship.rs
ISC License
44.72k stars 1.95k forks source link

Disable command time out warnings #5795

Closed squeaktoy closed 7 months ago

squeaktoy commented 7 months ago

Current Behavior

Currently, I see a warning from time to time about commands timing out. I don't care! I can't find a way to turn it off.

Expected Behavior

The command should time out, but nothing obnoxious should be printed. If possible, a warning symbol should be shown in your template just like any other thing in starship, rather than a verbose few lines being printed to the terminal that I am totally uninterested in.

Additional context/Screenshots

[WARN] - (starship::utils): Executing command "/usr/bin/cc" timed out.
[WARN] - (starship::utils): You can set command_timeout in your config to a higher value to allow longer-running commands to keep executing.
[WARN] - (starship::utils): Executing command "/usr/bin/gcc" timed out.
[WARN] - (starship::utils): Executing command "

Possible Solution

Rather than printing a detailed warning message, you could include a warning symbol inside the prompt format like everything else, just so you know that starship didn't execute all commands successfully.

Environment

# get rid of greeting message
set fish_greeting

# set theme
fish_config theme choose Mint

if status is-interactive
    # fzf.fish
    fzf_configure_bindings --directory=\e\cf --history=
end

Starship Configuration

"$schema" = 'https://starship.rs/config-schema.json'

command_timeout = 10

format = """
(\
$os\
$username\
)\
$c\
$rust\
$golang\
$nodejs\
$php\
$java\
$kotlin\
$haskell\
$python\
$docker_context\
\
$git_branch\
$git_status\
\
$directory\
$cmd_duration\
$status\
$line_break\
$character\
"""

palette = 'gruvbox_custom'

[palettes.gruvbox_dark]
color_fg0 = '#fbf1c7'
color_bg1 = '#3c3836'
color_bg3 = '#665c54'
color_blue = '#458588'
color_aqua = '#689d6a'
color_green = '#98971a'
color_orange = '#d65d0e'
color_purple = '#b16286'
color_red = '#cc241d'
color_yellow = '#d79921'

[palettes.gruvbox_custom]
color_fg0 = '#ffffff'
color_bg1 = '#28323e'
color_bg2 = '#282d33'
color_bg3 = '#00547b'
color_blue = '#003853'
color_light_blue = '#9ad6ff'
color_aqua = '#104333'
color_green = '#18dd21'
color_light_green = '#a3f6a7'
color_orange = '#a5480c'
color_light_orange = '#f8c19f'
color_purple = '#904165'
color_pink = '#dfb9ca'
color_dark_red = '#600704'
color_red = '#ff5f5f'
color_yellow = '#7f6713'

[os]
disabled = true
style = "bg:color_orange fg:color_fg0"

[os.symbols]
Windows = "󰍲"
Ubuntu = "󰕈"
SUSE = ""
Raspbian = "󰐿"
Mint = "󰣭"
Macos = "󰀵"
Manjaro = ""
Linux = "󰌽"
Gentoo = "󰣨"
Fedora = "󰣛"
Alpine = ""
Amazon = ""
Android = ""
Arch = "󰣇"
Artix = "󰣇"
CentOS = ""
Debian = "󰣚"
Redhat = "󱄛"
RedHatEnterprise = "󱄛"

[username]
show_always = true
style_user = "bg:color_orange fg:color_fg0"
style_root = "bg:color_orange fg:color_fg0"
format = '[ $user ]($style)'

[directory]
style = "bold fg:color_fg0 bg:color_blue"
format = "[ $path ]($style)"
truncation_length = 0
truncation_symbol = ""

[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = "󰝚 "
"Pictures" = " "
"Developer" = "󰲋 "

[git_branch]
symbol = "git"
style = "bg:color_aqua"
format = '[[ [$symbol](bold fg:color_light_green $style) $branch ](fg:color_fg0 bg:color_aqua)]($style)'

[git_status]
style = "bg:color_aqua"
format = '[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)'

[nodejs]
disabled = true
symbol = "node "
style = "bg:color_bg1"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[c]
symbol = "c"
style = "bg:color_bg1"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[rust]
symbol = "rust"
style = "bg:color_bg1"
format = '[[ [$symbol](fg:color_light_orange $style)( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[golang]
symbol = "go"
style = "bg:color_bg1"
format = '[[ [$symbol](fg:color_light_blue $style))( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[php]
symbol = "php"
style = "bg:color_bg1"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[java]
symbol = "java"
style = "bg:color_bg1"
format = '[[ [$symbol](fg:color_orange $style)( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[kotlin]
symbol = "kotlin"
style = "bg:color_bg1"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[haskell]
symbol = "haskell"
style = "bg:color_bg1"
format = '[[ [$symbol](fg:color_purple $style)( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[python]
symbol = "python"
style = "bg:color_bg1"
format = '[[ [$symbol](fg:color_light_blue $style)( $version) ](fg:color_fg0 bg:color_bg1)]($style)'

[docker_context]
disabled = true
symbol = "docker"
style = "bg:color_bg1"
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg1)]($style)'

[time]
disabled = false
time_format = "%R"
style = "bg:color_bg1"
format = '[[ $time ](fg:color_fg0 bg:color_bg1)]($style)'

[cmd_duration]
disabled = false
min_time = 10
show_milliseconds = true
style = "bg:color_bg3"
format = "[[ $duration ](fg:color_fg0 bg:color_bg3)]($style)"

[line_break]
disabled = true

[status]
disabled = false
style = "bold fg:color_red"
format = "[[ $common_meaning$signal_name$maybe_int](fg:color_red bg:color_dark_red)]($style)"

[character]
disabled = false
format = "[$symbol]($style)"
success_symbol = '[ ](bold fg:color_bg3)'
error_symbol = '[ ](bold fg:color_dark_red)'
vimcmd_symbol = '[ ](bold fg:color_green)'
vimcmd_replace_one_symbol = '[ ](bold fg:color_purple)'
vimcmd_replace_symbol = '[ ](bold fg:color_purple)'
vimcmd_visual_symbol = '[ ](bold fg:color_yellow)'
andytom commented 7 months ago

Please see the instructions in our FAQ.

squeaktoy commented 7 months ago

Thanks. Seems like I had looked over it while searching for it before.