Skip to content

Commit 854edda

Browse files
committed
use colorama
1 parent b4d31b8 commit 854edda

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tldr.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,9 +682,8 @@ def main() -> None:
682682
display_option_length = "long"
683683
if options.short_options and options.long_options:
684684
display_option_length = "both"
685-
if sys.platform == "win32":
686-
import colorama
687-
colorama.init(strip=options.color)
685+
import colorama
686+
colorama.init(strip=options.color)
688687

689688
if options.color is False:
690689
os.environ["FORCE_COLOR"] = "true"
@@ -749,7 +748,7 @@ def main() -> None:
749748
and results[0][1] != "common"
750749
and not options.platform):
751750
print(
752-
f"warning: showing page from platform"
751+
f"{colorama.Fore.YELLOW}warning{colorama.Fore.RESET}: showing page from platform"
753752
f" '{results[0][1]}', because '{command}' does"
754753
f" not exist in '{get_platform()}' and 'common'."
755754
)

0 commit comments

Comments
 (0)