[prev in list] [next in list] [prev in thread] [next in thread]
List: ast-users
Subject: Re: [ast-users] including newlines & tabs in extended getopts text?
From: Glenn Fowler <gsf () research ! att ! com>
Date: 2013-01-03 7:03:26
Message-ID: 201301030703.r0373QfP021971 () terra ! research ! att ! com
[Download RAW message or body]
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
> aaron.davies@gmail.com
> _______________________________________________
> ast-users mailing list
> ast-users@lists.research.att.com
> http://lists.research.att.com/mailman/listinfo/ast-users
_______________________________________________
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic