विकल्प
Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.
Declares a CLI option annotation.
Syntax: @ विकल्प <binding> [संक्षिप्त \"x\"] [longum \"name\"] [typus <type>] [descriptio \"...\"] [ubique] [vel <default>]
Category#
cli
Related#
Examples#
radix/corpus/annotation-sugar/optio-braced.fab (canonical · annotation)#
Braced canonical @ विकल्प CLI option record.
# =============================================================================
# विकल्प — Braced canonical @ विकल्प CLI option record.
# =============================================================================
#
# What this teaches:
# • Braced option annotation — `@ विकल्प { binding = NAME, … }` configures a
# CLI option with named fields
# • Option fields — binding, संक्षिप्त, विस्तृत, प्रकार, विवरण, and वैश्विक
# control how the option is parsed and documented
#
# Common mistakes:
# • omitting required fields like `binding` or `विस्तृत` in `@ विकल्प` braced records; boolean flags need `प्रकार तार्किक`
#
# See also: विकल्प, cli, annotation-sugar
# =============================================================================
# Braced @ विकल्प — canonical option record
#
# TARGET: annotation-sugar stage 2
# PAIR: sugar `@ विकल्प NAME संक्षिप्त \"x\" ...` (see विकल्प/optio.fab)
@ cli { name = "optio-braced-smoke" }
@ option { binding = verbose, short = "v", long = "verbose", type = bool, description = "Verbose mode", global = true }
main args args {
}radix/corpus/optio/optio.fab (canonical · keyword)#
Declares a CLI option annotation.
# =============================================================================
# विकल्प — Declares a CLI option annotation.
# =============================================================================
#
# What this teaches:
# • CLI options — `@विकल्प` declares named flags (short and long forms) for CLI subcommands.
# • Option metadata — Each option specifies binding, type, description, and optional default values.
#
# Common mistakes:
# • Declaring a boolean विकल्प without at least one of संक्षिप्त or विस्तृत — boolean flags need a flag form to be usable.
#
# See also: ऑपरेंड, cli, आदेश, वैश्विक, vel
# =============================================================================
# विकल्प — CLI option annotation
#
# GRAMMAR:
# annotation :← '@' 'विकल्प' optionSpec
#
# EXPECTED OUTPUT:
# No आरंभ — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only CLI metadata (whitelist: विकल्प/optio.fab).
#
@ cli "optio-smoke"
@ option verbose short "v" long "verbose" type bool description "Verbose mode"
@ option count long "count" type int description "Repeat count"
main args args {
}