lkml.org 
[lkml]   [2016]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 2/4] perf-probe: Add offline output directory option
Em Thu, Aug 25, 2016 at 07:48:16PM +0900, Masami Hiramatsu escreveu:
> On Wed, 24 Aug 2016 09:58:45 -0300
> Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> >
> > Also please fix the OPT_STRING string, it should start with a capital
> > letter:
> >
> > --max-probes <n> Set how many probe points can be found for a probe.
> > --no-inlines Don't search inlined functions
> > --outdir <directory>
> > path to offline output directory
> > --range Show variables location range in scope (with --vars only)
> >
> >
> > See how it stands out? All the others start with a capital letter.
>
> BTW, actually in most case, perf shows option explanations start without a captal letter,
>
> ./perf lock
>
> Usage: perf lock [<options>] {record|report|script|info}
>
> -D, --dump-raw-trace dump raw trace in ASCII
> -i, --input <file> input file name
> -v, --verbose be more verbose (show symbol address, etc)
>
> etc. Some commands (including probe) mixing it...

Right, inconsistent, so I went to see how other utilities do this, and,
say, something really old:

[acme@jouet linux]$ cp --help | grep -- "[ ]\+-[a-z]"
or: cp [OPTION]... -t DIRECTORY SOURCE...
-a, --archive same as -dR --preserve=all
-b like --backup but does not accept an argument
-d same as --no-dereference --preserve=links
-f, --force if an existing destination file cannot be
is ignored when the -n option is also used)
-i, --interactive prompt before overwrite (overrides a previous -n
-l, --link hard link files instead of copying
-n, --no-clobber do not overwrite an existing file (overrides
a previous -i option)
-p same as --preserve=mode,ownership,timestamps
-c deprecated, same as --preserve=context
-R, -r, --recursive copy directories recursively
-s, --symbolic-link make symbolic links instead of copying
-t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY
-u, --update copy only when the SOURCE file is newer
-v, --verbose explain what is being done
-x, --one-file-system stay on this file system
[acme@jouet linux]$

And then something more recent, and one perf initially was modelled after:

[acme@jouet linux]$ git commit -h |& grep -- "[ ]\+-[a-z]" | tail -15
-q, --quiet suppress summary after successful commit
-v, --verbose show diff in commit message template
-m, --message <message>
-c, --reedit-message <commit>
-s, --signoff add Signed-off-by:
-t, --template <file>
-e, --edit force edit of commit
-a, --all commit all changed files
-i, --include add specified files to index for commit
-p, --patch interactively add changes
-o, --only commit only specified files
-n, --no-verify bypass pre-commit hook
-z, --null terminate entries with NUL
-u, --untracked-files[=<mode>]
[acme@jouet linux]$

So, yeah, use lowercase and over time we can go on making it consistent...

- Arnaldo

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.092 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site