Skip to content

Formatting doesn't work with watch #811

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

Open
david-jointech opened this issue Sep 12, 2018 · 5 comments
Open

Formatting doesn't work with watch #811

david-jointech opened this issue Sep 12, 2018 · 5 comments

Comments

@david-jointech
Copy link

When using watch --color khal calendar the formatting (bold text and colors) doesn't seem to work.

I don't know exactly if this is an issue with khal or if it is one with watch. But watch does work for me with other programs (for example todotxt doesn't lose its color or boldness), so I am guessing khal is doing something differently here.

Using khal without watch (even with sh) works as expected. Does someone have an idea what the problem could be?

@david-jointech
Copy link
Author

Okay, I figured it out. watch --color khal --color does the trick. Only the calendar-color doesn't get shown, which I guess has to do with that one not being part of the shells color-theme.

@geier
Copy link
Member

geier commented Sep 19, 2018

Still sounds like a bug then, I'll reopen the issue. Can you post the output?

@geier geier reopened this Sep 19, 2018
@david-jointech
Copy link
Author

Which output exactly? The one from watch --color khal?
If I read the help correctly it kinda works as intended: --color / --no-color Use colored/uncolored output. Default is to only enable colors when not part of a pipe.. I guess watch does count as a pipe and thus disables colors.

@pacien
Copy link

pacien commented Dec 6, 2018

$ watch --color khal --color

Doesn't display any color for me, while khal alone (without watch) does colorize the output.
Both commands are able to display bold text.

$ khal --version
khal, version 0.9.9

$ watch --version
watch from procps-ng 3.3.15

@pacien
Copy link

pacien commented Dec 17, 2018

This seems to be an issue with the watch command itself.
Other command line tools such as taskwarrior are also impacted equally.

Foreground colors not in the 16 colors palette are displayed in the default color.
Background colors aren't displayed at all.

khal should perhaps try to match the closest available color in this case.

@geier geier added the pri:Low label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants