pwd
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| MacOSPwdCommand anyenv.os_commands.pwd macOS pwd command implementation. |
||
| UnixPwdCommand anyenv.os_commands.pwd Unix/Linux pwd command implementation. |
||
| WindowsPwdCommand anyenv.os_commands.pwd Windows pwd command implementation. |
🛈 DocStrings¶
Pwd command implementations for different operating systems.
MacOSPwdCommand
¶
Bases: PwdCommand
macOS pwd command implementation.
Source code in src/anyenv/os_commands/pwd.py
create_command
¶
parse_command
¶
Parse pwd 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
|
Current working directory or None on failure |
Source code in src/anyenv/os_commands/pwd.py
UnixPwdCommand
¶
Bases: PwdCommand
Unix/Linux pwd command implementation.
Source code in src/anyenv/os_commands/pwd.py
create_command
¶
parse_command
¶
Parse Unix pwd result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
str
|
Raw command output |
required |
exit_code
|
int
|
Command exit code |
0
|
Returns:
| Type | Description |
|---|---|
str | None
|
Current working directory or None on failure |
Source code in src/anyenv/os_commands/pwd.py
WindowsPwdCommand
¶
Bases: PwdCommand
Windows pwd command implementation.
Source code in src/anyenv/os_commands/pwd.py
create_command
¶
Generate Windows cd command (prints current directory when no args).
Returns:
| Type | Description |
|---|---|
str
|
The cd command string |
parse_command
¶
Parse Windows cd result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
str
|
Raw command output |
required |
exit_code
|
int
|
Command exit code |
0
|
Returns:
| Type | Description |
|---|---|
str | None
|
Current working directory or None on failure |