From 1d4d350ec68ee0ab39b0113cbabebf298526e09a Mon Sep 17 00:00:00 2001 From: 4shen0ne <33086594+zrquan@users.noreply.github.com> Date: Fri, 13 Sep 2024 21:57:54 +0800 Subject: [PATCH 1/2] fix --no-color --- lib/core/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/options.py b/lib/core/options.py index 03119700d..822b36228 100755 --- a/lib/core/options.py +++ b/lib/core/options.py @@ -353,7 +353,7 @@ def parse_config(opt): # View opt.full_url = opt.full_url or config.safe_getboolean("view", "full-url") - opt.color = opt.color or config.safe_getboolean("view", "color", True) + opt.color = opt.color if opt.color is False else config.safe_getboolean("view", "color", True) opt.quiet = opt.quiet or config.safe_getboolean("view", "quiet-mode") opt.redirects_history = opt.redirects_history or config.safe_getboolean( "view", "show-redirects-history" From bcb10a1eaf4ab6c8aaeeb33fc2fc765b21eebfce Mon Sep 17 00:00:00 2001 From: Pham Sy Minh <59408894+shelld3v@users.noreply.github.com> Date: Wed, 18 Sep 2024 22:30:14 +0700 Subject: [PATCH 2/2] Shorten code --- lib/core/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/options.py b/lib/core/options.py index 822b36228..1fa911bb8 100755 --- a/lib/core/options.py +++ b/lib/core/options.py @@ -353,7 +353,7 @@ def parse_config(opt): # View opt.full_url = opt.full_url or config.safe_getboolean("view", "full-url") - opt.color = opt.color if opt.color is False else config.safe_getboolean("view", "color", True) + opt.color = opt.color and config.safe_getboolean("view", "color", True) opt.quiet = opt.quiet or config.safe_getboolean("view", "quiet-mode") opt.redirects_history = opt.redirects_history or config.safe_getboolean( "view", "show-redirects-history"