Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add one shot commands to the coder ssh command#17779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
brettkolodny merged 11 commits intomainfrombett-feat/add-ssh-one-shot-command
May 16, 2025

Conversation

brettkolodny
Copy link
Contributor

@brettkolodnybrettkolodny commentedMay 12, 2025
edited
Loading

Closes#2154

Warning

The tests in this PR were co-authored by AI

@codercoder deleted a commentMay 12, 2025
Comment on lines +98 to +107
func(next serpent.HandlerFunc) serpent.HandlerFunc {
return func(i *serpent.Invocation) error {
got := len(i.Args)
if got < 1 {
return xerrors.New("expected the name of a workspace")
}

return next(i)
}
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Keep this here, but we should add a serpent MW forRequireMinArgs(n). I also wanted it at some point.

brettkolodny reacted with thumbs up emoji
cli/ssh.go Outdated
Use: "ssh <workspace>",
Short: "Start a shell into a workspace",
Use: "ssh <workspace> [command]",
Short: "Start a shell into a workspace or run a command",
Long: "This command does not have full parity with the standard SSH command. For users who need the full functionality of SSH, create an ssh configuration with `coder config-ssh`.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ssh <workspace> ls -la works, butcoder ssh <workspace> ls -la does not. I don't think we have to fix this, but we should have an example on how to pass flags. It is common unix stuff, but worth throwing in here imo.

Suggested change
Long:"This command does not have full parity with the standard SSH command. For users who need the full functionality of SSH, create an ssh configuration with `coder config-ssh`.",
Long:"This command does not have full parity with the standard SSH command. For users who need the full functionality of SSH, create an ssh configuration with `coder config-ssh`.\n"+
FormatExamples(
Example{
Description:"Use `--` to separate and pass flags directly to the command executed via SSH.",
Command:"coder ssh <workspace> -- ls -la",
},
),

brettkolodny reacted with thumbs up emoji
@brettkolodnybrettkolodny merged commit2cd3f99 intomainMay 16, 2025
36 checks passed
@brettkolodnybrettkolodny deleted the bett-feat/add-ssh-one-shot-command branchMay 16, 2025 14:09
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@brettkolodnybrettkolodny

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add support to for running commands in workspace viacoder ssh workspace [command]
2 participants
@brettkolodny@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp