Skip to content

Add support for negatable flags (--[no-]color)#718

Merged
DannyBen merged 1 commit into
masterfrom
add/negatable-flags
Jul 9, 2026
Merged

Add support for negatable flags (--[no-]color)#718
DannyBen merged 1 commit into
masterfrom
add/negatable-flags

Conversation

@DannyBen

@DannyBen DannyBen commented Jul 9, 2026

Copy link
Copy Markdown
Member

The main motivation behind this feature, is the recently added argfile support, which means that users can define something like --color in their argfile, and then they have no way to disable it.

This can now be mitigated easily with:

flags:
- long: --color
  short: -c
  help: Enable color output
  negatable: true

  • Implementation
  • Specs
  • Bashly bash completions
  • Bashly CLI docs (bashly doc flag.negatable)
  • JSON schema
  • bashly.dev docs - Source | Preview

@DannyBen DannyBen added this to the 1.4.0 milestone Jul 9, 2026
@DannyBen DannyBen merged commit 3343ac8 into master Jul 9, 2026
8 checks passed
@DannyBen DannyBen deleted the add/negatable-flags branch July 9, 2026 13:35
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