Skip to content

UnixCommandProvider

Base classes

Name Children Inherits
OSCommandProvider
anyenv.os_commands.providers
Base class for OS-specific command providers using command classes.

⋔ Inheritance diagram

graph TD
  3095508259["providers.UnixCommandProvider"]
  3219521113["providers.OSCommandProvider"]
  2751680898["builtins.object"]
  3219521113 --> 3095508259
  2751680898 --> 3219521113

🛈 DocStrings

Bases: OSCommandProvider

Unix/Linux command provider using GNU/POSIX tools.

Source code in src/anyenv/os_commands/providers.py
class UnixCommandProvider(OSCommandProvider):
    """Unix/Linux command provider using GNU/POSIX tools."""

    def __init__(self) -> None:
        """Initialize Unix command provider with Unix command instances."""
        super().__init__()
        self.commands = {
            "list_directory": UnixListDirectoryCommand(),
            "file_info": UnixFileInfoCommand(),
            "exists": UnixExistsCommand(),
            "is_file": UnixIsFileCommand(),
            "is_directory": UnixIsDirectoryCommand(),
            "create_directory": UnixCreateDirectoryCommand(),
            "remove_path": UnixRemovePathCommand(),
            "copy_path": UnixCopyPathCommand(),
            "base64_encode": UnixBase64EncodeCommand(),
            "which": UnixWhichCommand(),
            "pwd": UnixPwdCommand(),
            "env_var": UnixEnvVarCommand(),
            "find": UnixFindCommand(),
        }

__init__

__init__() -> None

Initialize Unix command provider with Unix command instances.

Source code in src/anyenv/os_commands/providers.py
def __init__(self) -> None:
    """Initialize Unix command provider with Unix command instances."""
    super().__init__()
    self.commands = {
        "list_directory": UnixListDirectoryCommand(),
        "file_info": UnixFileInfoCommand(),
        "exists": UnixExistsCommand(),
        "is_file": UnixIsFileCommand(),
        "is_directory": UnixIsDirectoryCommand(),
        "create_directory": UnixCreateDirectoryCommand(),
        "remove_path": UnixRemovePathCommand(),
        "copy_path": UnixCopyPathCommand(),
        "base64_encode": UnixBase64EncodeCommand(),
        "which": UnixWhichCommand(),
        "pwd": UnixPwdCommand(),
        "env_var": UnixEnvVarCommand(),
        "find": UnixFindCommand(),
    }

:fa-brands-github: Show source on GitHub