Bug#660106: hostname: [PATCH] improve cmd line --help and simplify manpage SYNOPSIS

February 16th, 2012 - 08:10 am ET by Jari Aalto | Report spam
This is a multi-part MIME message sent by reportbug.


MIME-Version: 1.0

Package: hostname
Version: 3.10
Severity: wishlist

I'm suggestion following minor updates:

- Output cmd line help in alhabetical order
- Simplify SYNOPSIS. The options are best explained in OPTTIONS sections.
- Mirror *.1.fr to that of *.1 for SYNOPSIS.

Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages hostname depends on:
ii libc6 2.13-26

hostname recommends no packages.

hostname suggests no packages.


MIME-Version: 1.0
filename="0002-hostname.1-Simplify-SYNOPSIS.patch"


From ce084cf248dd5a937a3f08f33addcdd861ccd548 Mon Sep 17 00:00:00 2001


From: Jari Aalto <jari.aalto@cante.net>
Date: Thu, 16 Feb 2012 02:48:28 -0500
Subject: [PATCH 2/3] hostname.1: Simplify SYNOPSIS
Organization: Private


Signed-off-by: Jari Aalto <jari.aalto@cante.net>

hostname.1 | 32 +++++
1 files changed, 5 insertions(+), 27 deletions(-)

diff --git a/hostname.1 b/hostname.1
index c80dbd3..a3d03f9 100644
a/hostname.1
+++ b/hostname.1
@@ -14,40 +14,18 @@ dnsdomainname \- show the system's DNS domain name

.SH SYNOPSIS
.B hostname
-.RB [ \-v ]
-.RB [ \-a ]
-.RB [ \-\-alias ]
-.RB [ \-d ]
-.RB [ \-\-domain ]
-.RB [ \-f ]
-.RB [ \-\-fqdn ]
-.RB [ \-A ]
-.RB [ \-\-all-fqdns ]
-.RB [ \-i ]
-.RB [ \-\-ip-address ]
-.RB [ \-I ]
-.RB [ \-\-all-ip-addresses ]
-.RB [ \-\-long ]
-.RB [ \-s ]
-.RB [ \-\-short ]
-.RB [ \-y ]
-.RB [ \-\-yp ]
-.RB [ \-\-nis ]
+.RB [ options ]
.br
.B hostname
.RB [ \-v ]
-.RB [ \-b ]
-.RB [ \-\-boot ]
-.RB [ \-F\ filename ]
-.RB [ \-\-file\ filename ]
+.RB [ \-b|\-\-boot ]
+.RB [ \-F|--file\ filename ]
.RB [ hostname ]
.br
.B hostname
.RB [ \-v ]
-.RB [ \-h ]
-.RB [ \-\-help ]
-.RB [ \-V ]
-.RB [ \-\-version ]
+.RB [ \-h|\-\-help ]
+.RB [ \-V|\-\-version ]
.PP
.B domainname
.RB [ nisdomain ]
1.7.9


MIME-Version: 1.0
filename="0001-hostname.c-usage-Order-items-alphabetically.patch"


From c3cf1aec19bc038e8460695a59bea111a5abf926 Mon Sep 17 00:00:00 2001


From: Jari Aalto <jari.aalto@cante.net>
Date: Thu, 16 Feb 2012 02:44:43 -0500
Subject: [PATCH 1/3] hostname.c: (usage): Order items alphabetically
Organization: Private


Signed-off-by: Jari Aalto <jari.aalto@cante.net>

hostname.c | 16 ++++++++--
1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/hostname.c b/hostname.c
index 3ff164a..36f4878 100644
a/hostname.c
+++ b/hostname.c
@@ -3,7 +3,7 @@
* that maintains the host name and the domain name. It
* is also used to show the FQDN and the IP-Addresses.
*
- * Usage: hostname [-d|-f|-s|-a|-i|-y|-A|-I]
+ * Usage: hostname [-a|-A|-d|-f|-i|-I|-s|-y]
* hostname [-h|-V]
* hostname [-b] {name|-F file}
* dnsdomainname
@@ -147,7 +147,7 @@ usage(FILE *stream)
{
fprintf(stream,
"Usage: hostname [-v] [-b] {hostname|-F file} set host name (from file)"
- " hostname [-v] [-d|-f|-s|-a|-i|-y|-A|-I] display formatted name"
+ " hostname [-v] [-a|-A|-d|-f|-i|-I|-s|-y] display formatted name"
" hostname [-v] display host name"
""
" {yp,nis,}domainname [-v] {nisdomain|-F file} set NIS domain name (from file)"
@@ -162,16 +162,16 @@ usage(FILE *stream)
" dnsdomainname=hostname -d"
""
"Program options:"
- " -s, --short short host name"
" -a, --alias alias names"
- " -i, --ip-address addresses for the host name"
- " -I, --all-ip-addresses all addresses for the host"
- " -f, --fqdn, --long long host name (FQDN)"
" -A, --all-fqdns all long host names (FQDNs)"
- " -d, --domain DNS domain name"
- " -y, --yp, --nis NIS/YP domain name"
" -b, --boot set default hostname if none available"
+ " -d, --domain DNS domain name"
+ " -f, --fqdn, --long long host name (FQDN)"
" -F, --file read host name or NIS domain name from given file"
+ " -i, --ip-address addresses for the host name"
+ " -I, --all-ip-addresses all addresses for the host"
+ " -s, --short short host name"
+ " -y, --yp, --nis NIS/YP domain name"
""
"Description:"
" This command can get or set the host name or the NIS domain name. You can"
1.7.9


filename="0003-hostname.1.fr-Simplify-SYNOPSIS.-Sync-with-.1-page.patch"


From 1c7a188dcb443345f28a8f9bb9c9713d9e81cb06 Mon Sep 17 00:00:00 2001


From: Jari Aalto <jari.aalto@cante.net>
Date: Thu, 16 Feb 2012 02:54:23 -0500
Subject: [PATCH 3/3] hostname.1.fr: Simplify SYNOPSIS. Sync with *.1 page
Organization: Private


Signed-off-by: Jari Aalto <jari.aalto@cante.net>

hostname.1.fr | 22 ++++++++++
1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/hostname.1.fr b/hostname.1.fr
index da31f87..58b799a 100644
a/hostname.1.fr
+++ b/hostname.1.fr
@@ -5,21 +5,19 @@ hostname \- affiche ou d
dnsdomainname \- affiche le nom de domaine du système
.SH SYNOPSIS
.B hostname
-.RB [ \-d ]
-.RB [ \-\-domain ]
-.RB [ \-F\ nom_de_fichier ]
-.RB [ \-\-file\ nom_de_fichier ]
-.RB [ \-f ]
-.RB [ \-\-fqdn ]
-.RB [ \-h ]
-.RB [ \-\-help ]
-.RB [ \-\-long ]
-.RB [ \-s ]
-.RB [ \-\-short ]
+.RB [ options ]
+.br
+.B hostname
.RB [ \-v ]
-.RB [ \-\-version ]
+.RB [ \-b|\-\-boot ]
+.RB [ \-F|\-\-file\ nom_de_fichier ]
.RB [ nom ]
.br
+.B hostname
+.RB [ \-v ]
+.RB [ \-h|\-\-help ]
+.RB [ \-V|\-\-version ]
+.PP
.B dnsdomainname
.SH DESCRIPTION
.B Hostname
1.7.9





To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Michael Meskes
February 16th, 2012 - 10:00 am ET | Report spam
I'm suggestion following minor updates:

- Output cmd line help in alhabetical order



Applied.

- Simplify SYNOPSIS. The options are best explained in OPTTIONS sections.



I beg to disagree. The manpage could use some simplification, I agree. However,
I don't like the idea of only listing options. Besides it is not correct as
some options do not belong to the first way of calling hostname.

Michael
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at googlemail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics