command-line-interface-pages / syntax

Syntax definition and highlighting for different editors
4 stars 0 forks source link

Allow switch between several placeholder examples along with alternatives in descriptions #21

Closed EmilyGraceSeville7cf closed 1 year ago

EmilyGraceSeville7cf commented 1 year ago

Given this code:

- Test if a specific ([f]ile/[d]irectory) exists:

`[ {string operator: -f, -d} {/?file some: ~/.bashrc|/?directory input: images} ]`

It should be possible to display example just for -f and for -d:

- Test if a specific [f]ile exists:

`[ -f {/?file some: ~/.bashrc} ]`

and

- Test if a specific [d]irectory exists:

`[ -d {/?directory some: ~/.bashrc} ]`

via smth like this clip-view --example-alternative 1 [. All examples are shown without --example-alternative option.

Restrictions

EmilyGraceSeville7cf commented 1 year ago

@kbdharun, what do u think about such idea and syntax?

kbdharun commented 1 year ago

@kbdharun, what do u think about such idea and syntax?

I guess it is fine

EmilyGraceSeville7cf commented 1 year ago

Syntax is slightly different than mentioned above. Please review it in my PR.