MacOSEnvVarCommand
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| EnvVarCommand anyenv.os_commands.base Base class for environment variable commands. |
⋔ Inheritance diagram¶
graph TD
233798467["env_var.MacOSEnvVarCommand"]
931535557["base.EnvVarCommand"]
925645236["abc.ABC"]
2751680898["builtins.object"]
931535557 --> 233798467
925645236 --> 931535557
2751680898 --> 925645236
🛈 DocStrings¶
Bases: EnvVarCommand
macOS environment variable command implementation.
Source code in src/anyenv/os_commands/env_var.py
create_command
¶
Generate printenv command (same as Unix).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of environment variable |
required |
Returns:
| Type | Description |
|---|---|
str
|
The printenv command string |
parse_command
¶
Parse printenv result (same as Unix).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
str
|
Raw command output |
required |
exit_code
|
int
|
Command exit code |
0
|
Returns:
| Type | Description |
|---|---|
str | None
|
Variable value or None if not set |