Sample Header Ad - 728x90

How do I append an option argument to the flag without spaces?

1 vote
1 answer
43 views
I am writing a program manual in [mdoc(7)](https://man.openbsd.org/mdoc.7) . One example of my programs has this synopsis: > parsrc.sh [-lf] [CSV_file] [Taken from ShellShoccar-jpn/Parsrs/parsrc.sh](https://github.com/ShellShoccar-jpn/Parsrs/blob/master/parsrc.sh) For example if you run parsrc.sh -lf - then ` is a null string. If you run parsrc.sh -lfEOL - then is EOL`. I wish I could render it like:

parsrc.sh -lfs [CSV_file]

And I tried with \&:
.Dd $Mdocdate$
.Dt PARSRC.SH 1
.Os
.Sh NAME
.Nm parsrc.sh
.Nd CSV parser
.Sh SYNOPSIS
.Nm parsrc.sh
.Op Fl lf \& Ar s
.Op Ar CSV_file
Then I got this rendered: Result of rendering with mandoc(1) Or with mandoc -Thtml:

SYNOPSIS

parsrc.sh [-lf - s] [CSV_file]
What is the appropriate way to realize it? Also this idea should be useful for example: > **file**s if **file** is an argument.
Asked by user261735 (109 rep)
Aug 1, 2024, 03:55 AM