mirror of
https://github.com/kiviktnm/decman.git
synced 2026-09-19 12:08:28 +00:00
Merge pull request #4 from kiviktnm/pacman-color-always-as-default
Set pacman output use colors by default
This commit is contained in:
+9
-5
@@ -180,26 +180,30 @@ class MyCommands(decman.config.Commands):
|
||||
def list_foreign_pkgs_versioned(self) -> list[str]:
|
||||
return ["pacman", "-Qm", "--color=never"]
|
||||
|
||||
# --color=always is used in many commands since --color=auto results in no color.
|
||||
# It seems a sensible default for me, since decman already uses color and it can't be disabled.
|
||||
|
||||
def install_pkgs(self, pkgs: list[str]) -> list[str]:
|
||||
return ["pacman", "-S", "--needed"] + pkgs
|
||||
return ["pacman", "-S", "--color=always", "--needed"] + pkgs
|
||||
|
||||
def install_files(self, pkg_files: list[str]) -> list[str]:
|
||||
return ["pacman", "-U", "--asdeps"] + pkg_files
|
||||
return ["pacman", "-U", "--color=always", "--asdeps"] + pkg_files
|
||||
|
||||
def set_as_explicitly_installed(self, pkgs: list[str]) -> list[str]:
|
||||
return ["pacman", "-D", "--asexplicit"] + pkgs
|
||||
|
||||
def install_deps(self, deps: list[str]) -> list[str]:
|
||||
return ["pacman", "-S", "--needed", "--asdeps"] + deps
|
||||
return ["pacman", "-S", "--color=always", "--needed", "--asdeps"
|
||||
] + deps
|
||||
|
||||
def is_installable(self, pkg: str) -> list[str]:
|
||||
return ["pacman", "-Sddp", pkg]
|
||||
|
||||
def upgrade(self) -> list[str]:
|
||||
return ["pacman", "-Syu"]
|
||||
return ["pacman", "-Syu", "--color=always"]
|
||||
|
||||
def remove(self, pkgs: list[str]) -> list[str]:
|
||||
return ["pacman", "-Rs"] + pkgs
|
||||
return ["pacman", "-Rs", "--color=always"] + pkgs
|
||||
|
||||
def enable_units(self, units: list[str]) -> list[str]:
|
||||
return ["systemctl", "enable"] + units
|
||||
|
||||
@@ -45,26 +45,27 @@ class Commands:
|
||||
"""
|
||||
Running this command installs the given packages from pacman repositories.
|
||||
"""
|
||||
return ["pacman", "-S", "--needed"] + pkgs
|
||||
return ["pacman", "-S", "--color=always", "--needed"] + pkgs
|
||||
|
||||
def install_files(self, pkg_files: list[str]) -> list[str]:
|
||||
"""
|
||||
Running this command installs the given packages files.
|
||||
"""
|
||||
return ["pacman", "-U", "--asdeps"] + pkg_files
|
||||
return ["pacman", "-U", "--color=always", "--asdeps"] + pkg_files
|
||||
|
||||
def set_as_explicitly_installed(self, pkgs: list[str]) -> list[str]:
|
||||
"""
|
||||
Running this command installs sets the given as explicitly installed.
|
||||
"""
|
||||
return ["pacman", "-D", "--asexplicit"] + pkgs
|
||||
return ["pacman", "-D", "--color=always", "--asexplicit"] + pkgs
|
||||
|
||||
def install_deps(self, deps: list[str]) -> list[str]:
|
||||
"""
|
||||
Running this command installs the given packages from pacman repositories.
|
||||
The packages are installed as dependencies.
|
||||
"""
|
||||
return ["pacman", "-S", "--needed", "--asdeps"] + deps
|
||||
return ["pacman", "-S", "--color=always", "--needed", "--asdeps"
|
||||
] + deps
|
||||
|
||||
def is_installable(self, pkg: str) -> list[str]:
|
||||
"""
|
||||
@@ -76,14 +77,14 @@ class Commands:
|
||||
"""
|
||||
Running this command upgrades all pacman packages.
|
||||
"""
|
||||
return ["pacman", "-Syu"]
|
||||
return ["pacman", "-Syu", "--color=always"]
|
||||
|
||||
def remove(self, pkgs: list[str]) -> list[str]:
|
||||
"""
|
||||
Running this command removes the given packages and their dependencies
|
||||
(that aren't required by other packages).
|
||||
"""
|
||||
return ["pacman", "-Rs"] + pkgs
|
||||
return ["pacman", "-Rs", "--color=always"] + pkgs
|
||||
|
||||
def enable_units(self, units: list[str]) -> list[str]:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user