oh-my-fish / theme-agnoster

MIT License
95 stars 64 forks source link

fix mode indicator for fish v2.3 #19

Closed olbrew closed 8 years ago

olbrew commented 8 years ago

This fixes the mode indicator by

sn0cr commented 8 years ago

I'm sorry I don't know a way to detect vi mode, as I don't use this mode.

Do you want to add a variable to turn off the vi mode indicator for user who don't want to use this feature? (I'm thinking of replacing this variable with a 'constant' that you can change in your fish.config while you're searching for a solution)

olbrew commented 8 years ago

I found a fix for the vi key bindings check.

Unfortunately I found out that my fix for the coloring of the right_segment_separator gives errors so I removed it again. It's not immediately clear to me how to give it the corresponding vi mode color in the fish_right_prompt function because the modes are switched in prompt_vi_mode without a global variable of some kind. Honestly the whole prompt_segment syntax seems like a reimplementation of built-in fish functions to me. A rewrite of fish_right_prompt.fish with built-in fish commands takes less than half the amount of LoC.

As this would simplify fish_right_prompt.fish considerably and fixes the right_segment_separator coloring issue, I'd be happy to make a new pull request if you're ok with that.

olbrew commented 8 years ago

@sn0cr any updates here?

sn0cr commented 8 years ago

Sorry that I'm responding that late, but due to midterm exams I didn't have time to have a look to github.

Sure do it 👍- A rewrite of the theme / coloring would be a great thing to do. I can merge it as soon as you are ready.

olbrew commented 8 years ago

No problem, I can relate, I'm having exams as well 😉 .

Ok, I'll close this pull request then as it still has some problems with the coloring and add a new one with the rewritten fish_right_prompt.fish as defined here. This fixes coloring issues for the right-prompt but not for the whole theme. Maybe I can take a look at that after my exams and when I have some more time 😄 .