CLI: -d/--directory option for the remote working directory (winrs -d) - #155
Conversation
winrs parity (-d): the command and shell subcommands now accept -d/--directory, mapped straight to CommandRequest.workingDirectory(...) so the remote shell is created with rsp:WorkingDirectory. A missing or blank value, or using the option with wql, is a usage error. Closes #138 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7537aea6c0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@codex please review again |
This reverts commit e8c20bd.
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…og features README.md stays terse; src/site/markdown (cli.md for the CLI) is the single source of truth for end-user documentation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@codex please review again |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #138.
What
winrsparity for-d[irectory]:PATH: thecommandandshellsubcommands now accept-d, --directory <path>, mapped straight toCommandRequest.workingDirectory(...)— the remote shell is created withrsp:WorkingDirectory, so the command (or the interactivecmd.exesession) starts in the requested directory instead of%USERPROFILE%.Since a CLI invocation is one client running one command, the API's "first command only" pinning caveat always applies — the option simply works. For
shell, the session opens its own connection whose first command is the shell itself, so it applies there too.Details
-dwas free (-his the hostname short option);--directoryis the long form.--directorywith thewqlsubcommand.--helpgets one line; the full description lives in the CLI manual options table (updated insrc/site/markdown/cli.md).Tests
CliArgumentsTest: parsing of both forms, default null, missing/blank value, rejection withwql.WinRmCliTest: pass-through to the remote operations for bothcommandandshell, plus full-stack wire assertions againstFakeWsmanServerthat the Create shell request carries<rsp:WorkingDirectory>— forexec(new test) and forshell(extended code-page test).mvn verify siteis green: 189 tests + the standalone-jar IT pass, checkstyle/PMD/SpotBugs clean.🤖 Generated with Claude Code