diff options
author | kvik <kvik@a-b.xyz> | 2020-05-07 00:10:09 +0200 |
---|---|---|
committer | kvik <kvik@a-b.xyz> | 2020-05-07 00:10:09 +0200 |
commit | ccf5d3fb9db7e58a9b9177f41edaf045b9294f86 (patch) | |
tree | 10b775fb9078d2924063a99a54e3efc2ea8b2266 /sys/man/8 | |
parent | 0dc9c8d0199db2746f2ca651911e8fa60e90e02f (diff) |
aux/getflags: improve flagfmt parser
This makes the flagfmt parser more robust and accepting
a looser input language — namely by allowing whitespace
around specifier fields and ignoring any empty fields.
Long flagfmts can thus be pleasingly displayed:
flagfmt='
a, b, c, C:cache,
m:mtpt mountpoint,
s:srvn srvname'
Diffstat (limited to 'sys/man/8')
-rw-r--r-- | sys/man/8/getflags | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/man/8/getflags b/sys/man/8/getflags index b0ea40835..457c0c2c7 100644 --- a/sys/man/8/getflags +++ b/sys/man/8/getflags @@ -71,7 +71,7 @@ The description of positional argument list is taken from An example of the script generated: .IP .EX -% flagfmt='e:example,x,a:arg with args' +% flagfmt='e:example, x, a:arg with args' % aux/getflags -exa arg list positional stuff example=() flagx=() @@ -87,7 +87,7 @@ Parse the arguments for .IR leak (1): .IP .EX -flagfmt='b:showbmp,s:acidfmt,f binary,r res,x width' +flagfmt='b:showbmp, s:acidfmt, f binary, r res, x width' args='name | pid list' if(! ifs=() eval `{aux/getflags $*} || ~ $#* 0){ aux/usage |