happy new year

the ast tw command has an EXAMPLES section you can examine by

        tw --usage 2>&1 | fmt -o

try something like

[+EXAMPLES]
    {
        [+tw?Lists the current directory tree.]
        [+tw chmod go-w?Turns off the group and other write permissions
            for all files in the current directory tree using a minimal
            amount of \bchmod\b(1) command execs.]
        [+tw -e \"uid != \'bozo\' || (mode & \'go=w\')\"?Lists all
            files in the current directory that don\'t belong to the user
            \bbozo\b or have group or other write permission.]
    }

On Thu, 3 Jan 2013 00:03:15 -0500 Aaron Davies wrote:
> is there a way to drop down a single line (and add a tab) in a man section 
> defined in an extended getopts text?

> e.g. the traditional way to format an EXAMPLES section seems to be

> command -xyz 1 foo
>       descriptive text

> (with the example itself in bold)

> but i can't figure out how to do that from a [+name?text] group

> e.g. in

> ~ :) % /bin/cat ./foo.ksh
> #!/usr/bin/env ksh 
> while getopts $'[-][+EXAMPLES?\bcommand -xyz 1 foo\b\ndescriptive text]' opt
> do
>     :
> done
> ~ :) % ksh --version
>   version         sh (AT&T Research) 93u 2011-02-08
> ~ :( % ./foo.ksh --man   
> EXAMPLES  command -xyz 1 foo descriptive text

> SYNOPSIS
>   ./foo.ksh [ options ]
> ~ :( % 

> the newline and the tab disappear

> (when i use --??nroff and generate a typeset manpage, the bold comes out 
> correctly)
> -- 
> Aaron Davies
> [email protected]
> _______________________________________________
> ast-users mailing list
> [email protected]
> http://lists.research.att.com/mailman/listinfo/ast-users

_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to