Skip to content
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

Some colors are printed even if they're disabled #63

Closed
tbu- opened this issue May 29, 2019 · 1 comment · Fixed by #64
Closed

Some colors are printed even if they're disabled #63

tbu- opened this issue May 29, 2019 · 1 comment · Fixed by #64
Labels
bug Something isn't working

Comments

@tbu-
Copy link

tbu- commented May 29, 2019

$ printf "%32s" "" | hexyl --border none --color never
 00000000  20 20 20 20 20 20 20 20   20 20 20 20 20 20 20 20                    
 *                                                                              
 00000020                                                                       
$ printf "%32s" "" | hexyl --border none --color never | hexdump -C
00000000  20 30 30 30 30 30 30 30  30 20 20 32 30 20 32 30  | 00000000  20 20|
00000010  20 32 30 20 32 30 20 32  30 20 32 30 20 32 30 20  | 20 20 20 20 20 |
00000020  32 30 20 20 20 32 30 20  32 30 20 32 30 20 32 30  |20   20 20 20 20|
00000030  20 32 30 20 32 30 20 32  30 20 32 30 20 20 20 20  | 20 20 20 20    |
00000040  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000050  0a 20 1b 5b 33 38 3b 35  3b 32 34 32 6d 2a 1b 5b  |. .[38;5;242m*.[|
00000060  30 6d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |0m              |
00000070  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000000b0  0a 20 30 30 30 30 30 30  32 30 20 20 20 20 20 20  |. 00000020      |
000000c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000100  20 0a                                             | .|
00000102

The star is colored even if colors are disabled.

(On another note, would it be possible to make --color=auto the default? That's how most CLI utilities work.)

@awidegreen
Copy link
Contributor

I'll fix that together with #62

awidegreen added a commit to awidegreen/hexyl that referenced this issue May 29, 2019
When color option has been set to never, the squeeze indicator
character asterisk '*' should not be printed in color.

Fixes sharkdp#63
@sharkdp sharkdp added the bug Something isn't working label May 30, 2019
sharkdp pushed a commit that referenced this issue May 30, 2019
When color option has been set to never, the squeeze indicator
character asterisk '*' should not be printed in color.

Fixes #63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants