You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By virtue of using clap, help and usage messaging is already ANSI styled. The software's own output could be improved by using ANSI styling as well. From the Command Line Interface Guidelines:
Use color with intention. For example, you might want to highlight some text so the user notices it, or use red to indicate an error. Don’t overuse it—if everything is a different color, then the color means nothing and only makes it harder to read.
Given the rather simple nature of this software, my suggestion would be to limit the use of ANSI styling to highlighting important information (e.g. what file system entry a line is about) or dimming optional information (e.g. error tips).
Suggestion
The following snippet aims to give an idea of how ANSI styling can be used to improve the software output. This suggestion is not necessarily complete nor final.
Note: Using HTML tags to give an idea of what would be styled, not necessarily how. Using <b> to indicate something deserves emphasis, <i> to dim text.
$ rm example_file example_dir
Would remove <b>example_file</b>
Cannot remove <b>example_dir</b>: Is a directory <i>(use '--dir' to remove)</i>
<b>1</b> would be removed <i>(use '--force' to remove)</i>, <b>1</b> error occurred
$ rm example_file example_dir --dir
Would remove <b>example_file</b>
Would remove <b>example_dir</b>
<b>2</b> would be removed <i>(use '--force' to remove)</i>, <b>0</b> errors occurred
$ rm example_file example_dir --dir --force
Removed <b>example_file</b>
Removed <b>example_dir</b>
<b>2</b> Removed, <b>0</b> errors occurred
While closed, suggestions for improvements/additions/changes to ANSI styling in the software's output are welcome. Either leave a comment here or create a new issue 🙂
Feature Request
Summary
By virtue of using
clap
, help and usage messaging is already ANSI styled. The software's own output could be improved by using ANSI styling as well. From the Command Line Interface Guidelines:Given the rather simple nature of this software, my suggestion would be to limit the use of ANSI styling to highlighting important information (e.g. what file system entry a line is about) or dimming optional information (e.g. error tips).
Suggestion
The following snippet aims to give an idea of how ANSI styling can be used to improve the software output. This suggestion is not necessarily complete nor final.
Requirements
Implementation should respect (some) NO_COLOR options, this should be verified in theSee Missing tests for ANSI formatting andno_color.rs
test suiteNO_COLOR
#14The text was updated successfully, but these errors were encountered: