From owner-freebsd-questions@freebsd.org Wed Oct 25 13:17:05 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F430E49CD7 for ; Wed, 25 Oct 2017 13:17:05 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay10.qsc.de (mailrelay10.qsc.de [212.99.163.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 997106C431 for ; Wed, 25 Oct 2017 13:17:04 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay10.qsc.de; Wed, 25 Oct 2017 15:16:49 +0200 Received: from r56.edvax.de (port-92-195-74-193.dynamic.qsc.de [92.195.74.193]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id BF20C3CBF9; Wed, 25 Oct 2017 15:16:48 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v9PDGldO002266; Wed, 25 Oct 2017 15:16:47 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 25 Oct 2017 15:16:47 +0200 From: Polytropon To: Manish Jain Cc: "freebsd-questions@freebsd.org" Subject: Re: A request to segregate man pages for shell built-ins Message-Id: <20171025151647.b1a1d512.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay10.qsc.de with 0B134683423 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1430 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2017 13:17:05 -0000 On Wed, 25 Oct 2017 02:23:23 +0000, Manish Jain wrote: > But I run into roughly the same weather with shell built-ins, most of > which do not have their own man page. 'man set' rather blandly throws up > the man page for the shell, and it takes an immense effort to glean the > relevant information. > > Is it not possible to create separate man pages for the shell built-ins > too ? Or at least ensure that invoking the built-in with --help gets the > necessary information ? The key problem is that different shells might have a builtin with the same name, but different syntax or behaviour. That's why you typically use "man sh" or "man csh" and then search for the builtin within that man page. > (Note : some built-ins (e.g. 'test') do have their own man pages) Well, test is a binary, a separate program, not a builtin. ;-) % which test /bin/test % which [ /bin/[ Of course, [ and test are actually one and the same binary. Keep in mind some shells also offer a builtin replacement for an existing binary. A good example is echo where a binary exists, but the C Shell has its own internal echo, while BASH uses the binary one: % which echo echo: shell built-in command. $ which echo /bin/echo In such a case, what should "man echo" show? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...