Closed Fity closed 5 years ago
Currently, I updated fish_prompt.fish
and ignore the duplicated sections. Now my for loop for render sections is like this:
if set -q SPACEFISH_RPROMPT_ORDER
set -a prompts_to_ignore $SPACEFISH_RPROMPT_ORDER
else
set -a prompts_to_ignore ''
end
for i in $SPACEFISH_PROMPT_ORDER
if not contains $i $prompts_to_ignore
eval __sf_section_$i
end
end
Hey @Fity! Thanks for opening up an issue.
This sounds like a very reasonable thing to add, and it sounds like it would also benefit spaceship to have it added as a feature. Since this project is aiming to achieve feature-parity with spaceship, I suggest you make an issue on that project to address your requested feature. 🚀
Once they've accepted it, we will gladly port it over to this project. 😄
@matchai Thanks for your reply. And here is the new issue: https://github.com/denysdovhan/spaceship-prompt/issues/605
For me it look like very and very bad idea. If I have time
in PROMPT
I will definitely expect it to be displayed here whatever I set in RPROMPT
. And if I will not find it displayed I will consider it as a bug or configuration problem. It's is two independent configuration properties.
Yes, if we manually add time
to PROMPT
, it may be a bad idea. But for most users, they will not know time
in PROMPT
before they set time
to enabled.
Maybe we could add a new flag to control if we want RPROMPT
to overwrite PROMPT
.
So the problem is in duplicated controls _SHOW
flags and PROMPT
. I think it's better to drop _SHOW
flags rather then create third control for the same thing.
Feature Request
Is your feature request related to a problem? Please describe. Simple with
SPACEFISH_TIME_SHOW
option, if we want to addtime
section to right prompt(and not also on the left prompt), we have to redefine theSPACEFISH_PROMPT_ORDER
option.Describe the solution you'd like When a section is in the right prompt, remove it from left prompt.
Describe alternatives you've considered Remove the section in
config.fish
manually.