-
Notifications
You must be signed in to change notification settings - Fork 131
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
Weird behavior at startup #240
Comments
That doesn't look like
|
Hmm... This doesn't happen with the default fish themes. So I thought pure is the cause.
|
As it seems you use lambda symbol instead of default arrow, could you describe what you expected vs what you got? What do you get when
|
I get nothing. By the way, what I wanted to say with the GIF is that the word "fish" appears at startup.
|
Can you try to see where it comes from:
Then explore the content of |
Here is the diff for tracing with and without pure. diff125c125,136
< +++ for /home/sora/.config/fish/conf.d/abbreviations.fish /home/sora/.config/fish/conf.d/aliases.fish /home/sora/.config/fish/conf.d/editor.fish /home/sora/.config/fish/conf.d/ghq.fish /home/sora/.config/fish/conf.d/ghq_key_bindings.fish /home/sora/.config/fish/conf.d/greeting.fish /home/sora/.config/fish/conf.d/peco.fish /home/sora/.config/fish/conf.d/prompt.fish
---
> +++ for /home/sora/.config/fish/conf.d/_pure_init.fish /home/sora/.config/fish/conf.d/abbreviations.fish /home/sora/.config/fish/conf.d/aliases.fish /home/sora/.config/fish/conf.d/editor.fish /home/sora/.config/fish/conf.d/ghq.fish /home/sora/.config/fish/conf.d/ghq_key_bindings.fish /home/sora/.config/fish/conf.d/greeting.fish /home/sora/.config/fish/conf.d/peco.fish /home/sora/.config/fish/conf.d/prompt.fish /home/sora/.config/fish/conf.d/pure.fish
> +++++ string replace -r '^.*/' '' -- /home/sora/.config/fish/conf.d/_pure_init.fish
> ++++ set -l basename _pure_init.fish
> ++++ contains -- _pure_init.fish
> ++++ set sourcelist _pure_init.fish
> ++++ '[' -f /home/sora/.config/fish/conf.d/_pure_init.fish -a -r /home/sora/.config/fish/conf.d/_pure_init.fish ']'
> ++++ source /home/sora/.config/fish/conf.d/_pure_init.fish
> ++++++ set --global --export VIRTUAL_ENV_DISABLE_PROMPT 1
> ++++++ set --global _pure_fresh_session true
> ++++++ functions -q _pure_prompt_new_line
> +++++++ source /home/sora/.config/fish/functions/_pure_prompt_new_line.fish
> +++++++++ function _pure_prompt_new_line --description 'Do not add a line break to a brand new session' --on-event fish_prompt
128,129c139,140
< ++++ contains -- abbreviations.fish
< ++++ set sourcelist abbreviations.fish
---
> ++++ contains -- abbreviations.fish _pure_init.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish
744,745c755,756
< ++++ contains -- aliases.fish abbreviations.fish
< ++++ set sourcelist abbreviations.fish aliases.fish
---
> ++++ contains -- aliases.fish _pure_init.fish abbreviations.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish aliases.fish
1192,1193c1203,1204
< ++++ contains -- editor.fish abbreviations.fish aliases.fish
< ++++ set sourcelist abbreviations.fish aliases.fish editor.fish
---
> ++++ contains -- editor.fish _pure_init.fish abbreviations.fish aliases.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish aliases.fish editor.fish
1199,1200c1210,1211
< ++++ contains -- ghq.fish abbreviations.fish aliases.fish editor.fish
< ++++ set sourcelist abbreviations.fish aliases.fish editor.fish ghq.fish
---
> ++++ contains -- ghq.fish _pure_init.fish abbreviations.fish aliases.fish editor.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish
1206,1207c1217,1218
< ++++ contains -- ghq_key_bindings.fish abbreviations.fish aliases.fish editor.fish ghq.fish
< ++++ set sourcelist abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish
---
> ++++ contains -- ghq_key_bindings.fish _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish
1217,1218c1228,1229
< ++++ contains -- greeting.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish
< ++++ set sourcelist abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish
---
> ++++ contains -- greeting.fish _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish
1224,1225c1235,1236
< ++++ contains -- peco.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish
< ++++ set sourcelist abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish peco.fish
---
> ++++ contains -- peco.fish _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish peco.fish
1231,1232c1242,1243
< ++++ contains -- prompt.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish peco.fish
< ++++ set sourcelist abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish peco.fish prompt.fish
---
> ++++ contains -- prompt.fish _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish peco.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish peco.fish prompt.fish
1236a1248,1451
> +++++ string replace -r '^.*/' '' -- /home/sora/.config/fish/conf.d/pure.fish
> ++++ set -l basename pure.fish
> ++++ contains -- pure.fish _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish peco.fish prompt.fish
> ++++ set sourcelist _pure_init.fish abbreviations.fish aliases.fish editor.fish ghq.fish ghq_key_bindings.fish greeting.fish peco.fish prompt.fish pure.fish
> ++++ '[' -f /home/sora/.config/fish/conf.d/pure.fish -a -r /home/sora/.config/fish/conf.d/pure.fish ']'
> ++++ source /home/sora/.config/fish/conf.d/pure.fish
> ++++++ set --global pure_version 3.2.0
> +++++++ source /home/sora/.config/fish/functions/_pure_set_default.fish
> +++++++++ function _pure_set_default --description 'Set default value for configuration variable' --argument-names var default
> ++++++ _pure_set_default pure_color_primary blue
> ++++++++ if
> ++++++++ set --query --universal pure_color_primary
> ++++++++ test -z blue
> ++++++++ end if
> ++++++ _pure_set_default pure_color_info cyan
> ++++++++ if
> ++++++++ set --query --universal pure_color_info
> ++++++++ test -z cyan
> ++++++++ end if
> ++++++ _pure_set_default pure_color_mute brblack
> ++++++++ if
> ++++++++ set --query --universal pure_color_mute
> ++++++++ test -z brblack
> ++++++++ end if
> ++++++ _pure_set_default pure_color_success magenta
> ++++++++ if
> ++++++++ set --query --universal pure_color_success
> ++++++++ test -z magenta
> ++++++++ end if
> ++++++ _pure_set_default pure_color_normal normal
> ++++++++ if
> ++++++++ set --query --universal pure_color_normal
> ++++++++ test -z normal
> ++++++++ end if
> ++++++ _pure_set_default pure_color_danger red
> ++++++++ if
> ++++++++ set --query --universal pure_color_danger
> ++++++++ test -z red
> ++++++++ end if
> ++++++ _pure_set_default pure_color_light white
> ++++++++ if
> ++++++++ set --query --universal pure_color_light
> ++++++++ test -z white
> ++++++++ end if
> ++++++ _pure_set_default pure_color_warning yellow
> ++++++++ if
> ++++++++ set --query --universal pure_color_warning
> ++++++++ test -z yellow
> ++++++++ end if
> ++++++ _pure_set_default pure_color_dark black
> ++++++++ if
> ++++++++ set --query --universal pure_color_dark
> ++++++++ test -z black
> ++++++++ end if
> ++++++ _pure_set_default pure_symbol_prompt ❯
> ++++++++ if
> ++++++++ set --query --universal pure_symbol_prompt
> ++++++++ test -z λ
> ++++++++ end if
> ++++++ _pure_set_default pure_symbol_reverse_prompt ❮
> ++++++++ if
> ++++++++ set --query --universal pure_symbol_reverse_prompt
> ++++++++ test -z â
> ++++++++ end if
> ++++++ _pure_set_default pure_color_prompt_on_error pure_color_danger
> ++++++++ if
> ++++++++ set --query --universal pure_color_prompt_on_error
> ++++++++ test -z pure_color_danger
> ++++++++ end if
> ++++++ _pure_set_default pure_color_prompt_on_success pure_color_success
> ++++++++ if
> ++++++++ set --query --universal pure_color_prompt_on_success
> ++++++++ test -z pure_color_success
> ++++++++ end if
> ++++++ _pure_set_default pure_color_current_directory pure_color_primary
> ++++++++ if
> ++++++++ set --query --universal pure_color_current_directory
> ++++++++ test -z pure_color_primary
> ++++++++ end if
> ++++++ _pure_set_default pure_enable_git true
> ++++++++ if
> ++++++++ set --query --universal pure_enable_git
> ++++++++ test -z false
> ++++++++ end if
> ++++++ _pure_set_default pure_symbol_git_unpulled_commits ⇣
> ++++++++ if
> ++++++++ set --query --universal pure_symbol_git_unpulled_commits
> ++++++++ test -z â£
> ++++++++ end if
> ++++++ _pure_set_default pure_symbol_git_unpushed_commits ⇡
> ++++++++ if
> ++++++++ set --query --universal pure_symbol_git_unpushed_commits
> ++++++++ test -z â¡
> ++++++++ end if
> ++++++ _pure_set_default pure_symbol_git_dirty '*'
> ++++++++ if
> ++++++++ set --query --universal pure_symbol_git_dirty
> ++++++++ test -z '*'
> ++++++++ end if
> ++++++ _pure_set_default pure_symbol_git_stash ≡
> ++++++++ if
> ++++++++ set --query --universal pure_symbol_git_stash
> ++++++++ test -z ≡
> ++++++++ end if
> ++++++ _pure_set_default pure_color_git_unpulled_commits pure_color_info
> ++++++++ if
> ++++++++ set --query --universal pure_color_git_unpulled_commits
> ++++++++ test -z pure_color_info
> ++++++++ end if
> ++++++ _pure_set_default pure_color_git_unpushed_commits pure_color_info
> ++++++++ if
> ++++++++ set --query --universal pure_color_git_unpushed_commits
> ++++++++ test -z pure_color_info
> ++++++++ end if
> ++++++ _pure_set_default pure_color_git_branch pure_color_mute
> ++++++++ if
> ++++++++ set --query --universal pure_color_git_branch
> ++++++++ test -z pure_color_mute
> ++++++++ end if
> ++++++ _pure_set_default pure_color_git_dirty pure_color_mute
> ++++++++ if
> ++++++++ set --query --universal pure_color_git_dirty
> ++++++++ test -z pure_color_mute
> ++++++++ end if
> ++++++ _pure_set_default pure_color_ssh_hostname pure_color_mute
> ++++++++ if
> ++++++++ set --query --universal pure_color_ssh_hostname
> ++++++++ test -z pure_color_mute
> ++++++++ end if
> ++++++ _pure_set_default pure_color_ssh_separator pure_color_mute
> ++++++++ if
> ++++++++ set --query --universal pure_color_ssh_separator
> ++++++++ test -z pure_color_mute
> ++++++++ end if
> ++++++ _pure_set_default pure_color_ssh_user_normal pure_color_mute
> ++++++++ if
> ++++++++ set --query --universal pure_color_ssh_user_normal
> ++++++++ test -z pure_color_mute
> ++++++++ end if
> ++++++ _pure_set_default pure_color_ssh_user_root pure_color_light
> ++++++++ if
> ++++++++ set --query --universal pure_color_ssh_user_root
> ++++++++ test -z pure_color_light
> ++++++++ end if
> ++++++ _pure_set_default pure_show_jobs false
> ++++++++ if
> ++++++++ set --query --universal pure_show_jobs
> ++++++++ test -z false
> ++++++++ end if
> ++++++ _pure_set_default pure_color_jobs pure_color_normal
> ++++++++ if
> ++++++++ set --query --universal pure_color_jobs
> ++++++++ test -z pure_color_normal
> ++++++++ end if
> ++++++ _pure_set_default pure_show_system_time false
> ++++++++ if
> ++++++++ set --query --universal pure_show_system_time
> ++++++++ test -z false
> ++++++++ end if
> ++++++ _pure_set_default pure_color_system_time pure_color_mute
> ++++++++ if
> ++++++++ set --query --universal pure_color_system_time
> ++++++++ test -z pure_color_mute
> ++++++++ end if
> ++++++ _pure_set_default pure_color_virtualenv pure_color_mute
> ++++++++ if
> ++++++++ set --query --universal pure_color_virtualenv
> ++++++++ test -z pure_color_mute
> ++++++++ end if
> ++++++ _pure_set_default pure_begin_prompt_with_current_directory true
> ++++++++ if
> ++++++++ set --query --universal pure_begin_prompt_with_current_directory
> ++++++++ test -z true
> ++++++++ end if
> ++++++ _pure_set_default pure_separate_prompt_on_error false
> ++++++++ if
> ++++++++ set --query --universal pure_separate_prompt_on_error
> ++++++++ test -z false
> ++++++++ end if
> ++++++ _pure_set_default pure_threshold_command_duration 5
> ++++++++ if
> ++++++++ set --query --universal pure_threshold_command_duration
> ++++++++ test -z 5
> ++++++++ end if
> ++++++ _pure_set_default pure_color_command_duration pure_color_warning
> ++++++++ if
> ++++++++ set --query --universal pure_color_command_duration
> ++++++++ test -z pure_color_warning
> ++++++++ end if
> ++++++ _pure_set_default pure_reverse_prompt_symbol_in_vimode true
> ++++++++ if
> ++++++++ set --query --universal pure_reverse_prompt_symbol_in_vimode
> ++++++++ test -z true
> ++++++++ end if
> ++++++ _pure_set_default pure_symbol_title_bar_separator —
> ++++++++ if
> ++++++++ set --query --universal pure_symbol_title_bar_separator
> ++++++++ test -z â
> ++++++++ end if
> ++++++ _pure_set_default pure_check_for_new_release false
> ++++++++ if
> ++++++++ set --query --universal pure_check_for_new_release
> ++++++++ test -z false
> ++++++++ end if
1391,1393c1606,1609
< + source /usr/share/fish/functions/fish_prompt.fish
< +++ function fish_prompt --description 'Write out the prompt'
sora@sora ~>
---
> + source /home/sora/.config/fish/functions/fish_prompt.fish
> +++ function fish_prompt
~
> λ |
I don't see anything related to the pre-prompt text, maybe @faho would know what's up with this text appearing on new shell
|
This looks like fish printing the terminal title. It seems your OS/terminal combo can't deal with it. Try removing your Note that the "⏎" isn't part of the output, fish adds it later to get the prompt onto a new line. If there is no newline, it'll show up, if there is it'll be overwritten. Also:
Going by the gif, this actually looks like WSL - which is an... idiosyncratic system that requires some workarounds. Mentioning it helps! (as does mentioning the terminal you use) |
Oh, I removed |
Thanks @faho, I'm closing then |
By removing |
@faho I'm using WSL2, Windows Terminal and Void Linux. But, WSL2 is a complete Linux kernel (like Docker for Mac/Win), so everything should just works. (Well, there are some incompatibilities on WSL1, but they're strictly in Microsoft's court. They steadily fix some of these things.) |
Well, it doesn't. In particular the terminal is still a windows thing, and it's still kinda weird and e.g. doesn't support bracketed paste. In this case, it seems to confuse the title-bar-separator with the end of the terminal title sequence - what did you set it to? |
I have not set anything for |
It's a little weird but adding this to the configuration solves the problem. set -gx pure_symbol_title_bar_separator "-" |
So maybe we should change the default title bar separator as it will prevent issue for other people quite easily. @smorimoto Do you want to submit a PR? |
@edouard-lopez I opened it. |
Env
Pure:
Fish:
OS/distribution:
The text was updated successfully, but these errors were encountered: