public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] last: mention optional arguments in usage
@ 2013-08-13 15:09 Bernhard Voelker
  2013-08-13 15:42 ` Benno Schulenberg
  0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Voelker @ 2013-08-13 15:09 UTC (permalink / raw)
  To: util-linux; +Cc: Bernhard Voelker

* login-utils/last.c (usage): Add '[name...]' to document the optional
username or terminal type argument.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
---
 login-utils/last.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/login-utils/last.c b/login-utils/last.c
index 0f475f2..913637e 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -418,7 +418,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
 {
 	fputs(USAGE_HEADER, out);
 	fprintf(out, _(
-		" %s [options]\n"), program_invocation_short_name);
+		" %s [options] [name...]\n"), program_invocation_short_name);
 
 	fputs(USAGE_OPTIONS, out);
 	fputs(_(" -<number>            how many lines to show\n"), out);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] last: mention optional arguments in usage
  2013-08-13 15:09 [PATCH] last: mention optional arguments in usage Bernhard Voelker
@ 2013-08-13 15:42 ` Benno Schulenberg
  2013-08-13 19:59   ` Bernhard Voelker
  0 siblings, 1 reply; 5+ messages in thread
From: Benno Schulenberg @ 2013-08-13 15:42 UTC (permalink / raw)
  To: Bernhard Voelker; +Cc: Util-Linux


On Tue, Aug 13, 2013, at 17:09, Bernhard Voelker wrote:
> -		" %s [options]\n"), program_invocation_short_name);
> +		" %s [options] [name...]\n"), program_invocation_short_name);

Better use angular-brackets convention right away: "[<name>...]".

Regards,

Benno

-- 
http://www.fastmail.fm - Send your email first class


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] last: mention optional arguments in usage
  2013-08-13 15:42 ` Benno Schulenberg
@ 2013-08-13 19:59   ` Bernhard Voelker
  2013-08-14  8:34     ` Benno Schulenberg
  0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Voelker @ 2013-08-13 19:59 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Util-Linux

On 08/13/2013 05:42 PM, Benno Schulenberg wrote:
> 
> On Tue, Aug 13, 2013, at 17:09, Bernhard Voelker wrote:
>> -		" %s [options]\n"), program_invocation_short_name);
>> +		" %s [options] [name...]\n"), program_invocation_short_name);
> 
> Better use angular-brackets convention right away: "[<name>...]".

Correct. I just did it as in the man page, therefore that
one should also be fixed.

However, I'm not that happy with it anyway, because <name> can
either be a username or a terminal name, e.g. 'last root tty0',
and '<name>' does not describe that too well.

Any idea - besides falling back to the old '[<username>..] [tty..]'
(which isn't too bad IMO)?

Have a nice day,
Berny

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] last: mention optional arguments in usage
  2013-08-13 19:59   ` Bernhard Voelker
@ 2013-08-14  8:34     ` Benno Schulenberg
  2013-08-23 10:02       ` Karel Zak
  0 siblings, 1 reply; 5+ messages in thread
From: Benno Schulenberg @ 2013-08-14  8:34 UTC (permalink / raw)
  To: Bernhard Voelker; +Cc: Util-Linux

On Tue, Aug 13, 2013, at 21:59, Bernhard Voelker wrote:
> On 08/13/2013 05:42 PM, Benno Schulenberg wrote:
> > Better use angular-brackets convention right away: "[<name>...]".
> 
> Correct. I just did it as in the man page, therefore that
> one should also be fixed.

No, man pages do not use angular brackets, they use instead
italics for arguments.

> However, I'm not that happy with it anyway, because <name> can
> either be a username or a terminal name, e.g. 'last root tty0',
> and '<name>' does not describe that too well.

Yes, I thought of that too, moments after sending the mail.  :)

> Any idea - besides falling back to the old '[<username>..] [tty..]'
> (which isn't too bad IMO)?

"<username>" and ".RI [ username ...]" would be fine.

Benno

-- 
http://www.fastmail.fm - The professional email service


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] last: mention optional arguments in usage
  2013-08-14  8:34     ` Benno Schulenberg
@ 2013-08-23 10:02       ` Karel Zak
  0 siblings, 0 replies; 5+ messages in thread
From: Karel Zak @ 2013-08-23 10:02 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Bernhard Voelker, Util-Linux

On Wed, Aug 14, 2013 at 10:34:09AM +0200, Benno Schulenberg wrote:
> On Tue, Aug 13, 2013, at 21:59, Bernhard Voelker wrote:
> > On 08/13/2013 05:42 PM, Benno Schulenberg wrote:
> > > Better use angular-brackets convention right away: "[<name>...]".
> > 
> > Correct. I just did it as in the man page, therefore that
> > one should also be fixed.
> 
> No, man pages do not use angular brackets, they use instead
> italics for arguments.
> 
> > However, I'm not that happy with it anyway, because <name> can
> > either be a username or a terminal name, e.g. 'last root tty0',
> > and '<name>' does not describe that too well.
> 
> Yes, I thought of that too, moments after sending the mail.  :)
> 
> > Any idea - besides falling back to the old '[<username>..] [tty..]'
> > (which isn't too bad IMO)?
> 
> "<username>" and ".RI [ username ...]" would be fine.

 Fixed (in .c and .1), Thanks Bernhard!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-23 10:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 15:09 [PATCH] last: mention optional arguments in usage Bernhard Voelker
2013-08-13 15:42 ` Benno Schulenberg
2013-08-13 19:59   ` Bernhard Voelker
2013-08-14  8:34     ` Benno Schulenberg
2013-08-23 10:02       ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox