Skip to content

Conversation

DannyBen
Copy link
Member

@DannyBen DannyBen commented Aug 1, 2024

Adds support for cross-dependency between flags for cases when some flags are required only if other flags were provided.

Discovered in #542

Todo

  • Initial pilot
  • Confirmed implementation
  • Example
  • Tests
  • Update bashly YAML/JSON schema
  • Update strings JSON schema
  • Update bashly docs command
  • Apply to usage help
  • Apply to mandoc / markdown generator
  • Specs pass
  • Update doc site

Sample bashly.yml

name: cli

flags:
- long: --add
  short: -a
  arg: alias
  help: Alias to add
  needs: [--command]
- long: --command
  short: -c
  arg: command
  help: Command to add
  needs: [--alias]

@DannyBen DannyBen merged commit 6469ee1 into master Aug 2, 2024
@DannyBen DannyBen deleted the add/flag-needs branch August 2, 2024 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant