bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Don't show help of `readonly' and `readarray' when I run `help read'


From: Chris F.A. Johnson
Subject: Re: Don't show help of `readonly' and `readarray' when I run `help read'
Date: Thu, 10 Feb 2011 17:34:08 -0500 (EST)
User-agent: Alpine 2.00 (LMD 1167 2008-08-23)

On Thu, 10 Feb 2011, Maarten Billemont wrote:

On 10 Feb 2011, at 15:21, Chet Ramey wrote:

On 2/10/11 4:03 AM, Clark J. Wang wrote:
help: help [-dms] [pattern ...]

From my understanding the *pattern* here must be a glob-style pattern
(wildcard) so `readonly' does not match the pattern `read'.

The pattern is composed of the same characters as a glob pattern, but
it's treated more like 'grep ^pattern topic' if it doesn't contain any
special pattern matching characters.

Kind of like the following:

$ printf "%s\n" read readonly readarray | grep ^read /dev/stdin
read
readonly
readarray

I must admit I personally dislike getting three pages of help output I don't 
care about when doing `help read`.  If I wanted to learn about `readonly`, I'd 
do `help readonly`.  I'm not sure the current behavior has any real merits over 
treating the pattern like glob pattern matching usually works (anchored to 
beginning and end).

  I totally agree.

--
   Chris F.A. Johnson, <http://cfajohnson.com/>
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]