Skip to content

Dagger Shell: Allow using flags for required args #10819

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jpadams
Copy link
Contributor

@jpadams jpadams commented Jul 30, 2025

fixes #9701

With this PR you can use a flag for any arg (e.g. --argname) including required args where previously Dagger Shell would strictly require a positional arg WITHOUT a flag. Use all the flags or just the ones you want for clarity.

Any args without flags should act as positional args to fill in the remaining ordered positional slots.

  • more manual testing

  • docs after PR merged because we want to ship this, get feedback and incorporate into new docs

  • perhaps make error messages better regarding required/positional in a followup

  • perhaps more tests in a followup if needed

  • After merging this PR, will look at idea of autocompletion of flags

@jpadams jpadams marked this pull request as draft July 30, 2025 19:39
@jpadams jpadams force-pushed the support-arg-names branch from 4bce27a to e5235b1 Compare July 30, 2025 19:40
@jpadams jpadams requested review from helderco and kpenfound July 30, 2025 19:43
jpadams added 2 commits July 30, 2025 13:41
Attempt to solve dagger#9701

Signed-off-by: Jeremy Adams <jeremy@dagger.io>
Signed-off-by: Jeremy Adams <jeremy@dagger.io>
@jpadams jpadams force-pushed the support-arg-names branch from e5235b1 to 13de4b5 Compare July 30, 2025 20:41
@jpadams jpadams added area/cli All about go code on dagger CLI kind/dx labels Jul 30, 2025
@jpadams jpadams requested a review from samalba July 30, 2025 23:14
@jpadams jpadams marked this pull request as ready for review July 30, 2025 23:15
@jpadams jpadams changed the title Allow using flags for required args Dagger Shell: Allow using flags for required args Aug 1, 2025
@jpadams jpadams requested a review from shykes August 4, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli All about go code on dagger CLI kind/dx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shell: Allow using flags for required args
1 participant