There seems to be no way to suppress colored output for e-file: - no option to control color - no test if output is to a terminal (and not to a file) To reproduce: $ e-file foo > somefile # output contains color codes It would be nice if things were handled as in e.g., GNU ls: --color[=WHEN] colorize the output; WHEN can be 'never', 'auto', or 'always' (the default); more info below With --color=auto, ls emits color codes only when standard output is connected to a terminal.
Created attachment 527308 [details] e-file with nocolor option Hi, you mean like the attached e-file script? regards Daniel
Created attachment 527528 [details] e-file with nocolor option You also need the conditional for clearcolor else the color codes for white text are printed. I have attached a version which fixes this. Additionally I tried to implement it as requested. If called with: nocolor - color is suppressed in any case color - color is enabled in any case auto - print with color if output is to terminal and without color if output is redirected to a file.
Created attachment 527530 [details, diff] diff to current version
Created attachment 528172 [details] e-file with nocolor option Looks good. Minor change: initialized color variable. And I also updated the URL as the old was ... well... very old :)
Created attachment 528174 [details, diff] diff to current version diff to current version
Fixed in Git with pfl-3.0. Thanks for the report!