feat(status): add tide_status_display
Description
Add a tide_status_display variable to display the status item:
- either only for complex statutes (
0, the default and current behavior), - or for all non-zero statutes (
1), - or for all statutes (
2).
Motivation and Context
Closes #454
How Has This Been Tested
I've added some tests to check that setting tide_status_display to 1 and 2 has an impact on displaying status (when character is set).
- [x] I have tested using Linux.
- [ ] I have tested using MacOS.
Checklist
- [x] I am ready to update the wiki accordingly.
- [x] I have updated the tests accordingly.
Wiki update proposal
status
| Variable | Description | Type | Default |
|---|---|---|---|
bg_color |
background color when $status = 0 |
color |
|
bg_color_failure |
background color when $status > 0 |
color |
|
color |
color when $status = 0 |
color |
|
color_failure |
color when $status > 0 |
color |
|
icon |
icon when $status = 0 |
icon |
|
icon_failure |
icon when $status > 0 |
icon |
|
display |
whether to display the status according to $status |
integer |
0 |
For tide_status_display, 0 would show status when $status > 1, 1 would show status when $status > 0, and 2 would show status in any case.
I'm currently configuring my tide prompt (by hand, not using the tide configure command) and this is exactly what I'm looking for, great job!
Any idea on if/when this will be merged? @IlanCosman Just did a quick glance over the changes and they seem pretty reasonable/minimal.
A nice addition would be to pull the character item out of the status icon completely. It doesn't belong in there, if the user want's to see both the character and the status that should be possible. Decoupling also makes it easier to debug/maintain/test.