diff --git a/docs/tutorials/env-vars.md b/docs/tutorials/env-vars.md index a404581c3..b6fdb7499 100644 --- a/docs/tutorials/env-vars.md +++ b/docs/tutorials/env-vars.md @@ -6,7 +6,7 @@ Pwndbg relies on several environment variables to customize its behavior. Below - `EDITOR`, `VISUAL`: Used by the `cymbol` command to open an editor. - `HOME`, `XDG_CACHE_HOME`: Used by `lib.tempfile` to determine temporary file locations. - `PWNDBG_VENV_PATH`: Specifies the virtual environment path for Pwndbg. -- `PWNDBG_DISABLE_COLORS`: Disables colored output in Pwndbg. +- `NO_COLOR`: Disables colored output in Pwndbg. - `PWNDBG_LOGLEVEL`: Initial log level to use for log messages. - `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`: Used by the `ai` command for accessing respective AI APIs. - `GITHUB_ACTIONS`, `RUN_FLAKY`: Used by `tests_commands.py` to determine the test environment. diff --git a/pwndbg/color/__init__.py b/pwndbg/color/__init__.py index 53f5cb323..74a659fd9 100644 --- a/pwndbg/color/__init__.py +++ b/pwndbg/color/__init__.py @@ -145,7 +145,7 @@ def unstylize(x: str) -> str: disable_colors = theme.add_param( "disable-colors", - bool(os.environ.get("PWNDBG_DISABLE_COLORS")), + bool(os.environ.get("NO_COLOR")), "whether to color the output or not", ) diff --git a/tests/host/gdb/__init__.py b/tests/host/gdb/__init__.py index 19fdf251c..39389bdeb 100644 --- a/tests/host/gdb/__init__.py +++ b/tests/host/gdb/__init__.py @@ -69,7 +69,7 @@ class GDBTestHost(TestHost): env["COVERAGE_FILE"] = str(coverage_out) env["COVERAGE_PROCESS_START"] = str(self._pwndbg_root / "pyproject.toml") env["PWNDBG_LAUNCH_TEST"] = case - env["PWNDBG_DISABLE_COLORS"] = "1" + env["NO_COLOR"] = "1" env["GDB_BIN_PATH"] = str(self._gdb_path) env["TEST_BINARIES_ROOT"] = str(self._binaries_root) if interactive: diff --git a/tests/host/lldb/launch_guest.py b/tests/host/lldb/launch_guest.py index 974503211..78bf9761f 100644 --- a/tests/host/lldb/launch_guest.py +++ b/tests/host/lldb/launch_guest.py @@ -63,7 +63,7 @@ async def _run(ctrl: Any, outer: Callable[..., Coroutine[Any, Any, None]]) -> No def run(pytest_args: List[str], pytest_plugins: List[Any] | None) -> int: # The import path is set up before this function is called. - os.environ["PWNDBG_DISABLE_COLORS"] = "1" + os.environ["NO_COLOR"] = "1" from pwndbginit import pwndbg_lldb diff --git a/tests/library/qemu_system/system-tests.sh b/tests/library/qemu_system/system-tests.sh index 97904fa27..68e4f4fc0 100755 --- a/tests/library/qemu_system/system-tests.sh +++ b/tests/library/qemu_system/system-tests.sh @@ -197,7 +197,7 @@ run_test() { COVERAGE_PROCESS_START=$COVERAGERC_PATH \ USE_PDB="$should_drop_to_pdb" \ PWNDBG_LAUNCH_TEST="${test_case}" \ - PWNDBG_DISABLE_COLORS=1 \ + NO_COLOR=1 \ PWNDBG_ARCH="${arch}" \ PWNDBG_KERNEL_TYPE="${kernel_type}" \ PWNDBG_KERNEL_VERSION="${kernel_version}" \