Some paths have no lscolors entry.
- Using the default style, white on black.
This commit is contained in:
parent
f5fb1cc84a
commit
2f328ee595
1 changed files with 2 additions and 0 deletions
|
|
@ -697,6 +697,8 @@ def run_tool_no_error(path, tool):
|
|||
|
||||
def _charstyle_of_path(path):
|
||||
color_code = lscolors.color_code_for_path(path, _LS_COLOR_CODES)
|
||||
if color_code is None:
|
||||
return termstr.CharStyle()
|
||||
term_text = termstr.ESC + "[" + color_code + "m-"
|
||||
return termstr.TermStr.from_term(term_text).style[0]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue