Path: csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Clint Hepner Newsgroups: gnu.bash.bug Subject: Re: man bash does not list 'in' as a builtin command Date: Mon, 25 Nov 2019 20:15:12 -0500 Lines: 131 Approved: bug-bash@gnu.org Message-ID: References: <4dc457e0135603025cd500acdc95db53f9d30482.camel@peterbenjamin.com> <6F7CBE03-C2F4-45CC-91D6-8A72A0C7B3B6@gmail.com> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1574730908 23958 209.51.188.17 (26 Nov 2019 01:15:08 GMT) X-Complaints-To: action@cs.stanford.edu Cc: "bash.bug list" , bash@packages.debian.org To: Peter Benjamin Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=SRjwndcyxofmEISyubYe4v9Su8T7K6L48vRqBXSsTLE=; b=OC/3G0RKUcYFVeqLM90cI8LUWr4/G7V52V3d4TytbkKkZNlxjHwSmQBiSBMG1zmnwB XGWVxetdGp40/wI3+ebiGTPLglldDlDOTMAr1coGhQmA2P1OOluuG1gxHQ9h7mS6rb28 UVPmeyq6IIpbd1A5pdq9qqRn0PpdM8HwG3iM7y7MjjjX3NO36cKq8A7vXVjhBD3eCEeX ZfMR/GmSXFWqe4pvRSheovQsQgOyhdAq0Of7wMsikeDe3OLg+uWpmqRTfU30DaOJhPtk OuKZ0X4mUiGmIHkg4MuwyXIIJx8yu2+9szqEaDfVN716a8fcdM/mJ7nYhy/sOmANlG2X OIrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=SRjwndcyxofmEISyubYe4v9Su8T7K6L48vRqBXSsTLE=; b=pWvTvAuo79G6y9aW+5w6D7x0884/9M6mZ+R2jIeljaskWoE5zoqiB2wZzulQKAgpkc +NrcQ1XO6NL2h/QZ1qee/MVgiKaxhd/1E+zYZQZX2iyCOFDbfHoDNRQ7UkblfAQ1ba5m A461MRFCXu9/xPtYpKId0jcrXo6gGB570oaXAhjEu0nGaeBj9cTYCZUwsZr3wZ7gkLdl ClC9XDKe/Ld8tCg8mM4BnT5dS7Q0771eL+rH7vYSedZ3CytFOcsOSDHveTOMCvrfNMqS vwUvdgXjLmOWruVi2mCvqeV0Dtsp8ojmZQAojknblxoxh8CPnM0rSeF4IOP8Q2NyfI9e U/4Q== X-Gm-Message-State: APjAAAXmlvYwaynhBi8PvY7FUfnERbz9oEA+LACWCtV9rFH681b9WW0R 14TsCI5t+oHT6jvaetCwTBY= X-Google-Smtp-Source: APXvYqwZD5RDE9PeN8YOJpRpGQrS93Is3A7oK7tRtkQnFg2wmdUTbFjhE1fcaJaH7p7hW6IQCLRorw== X-Received: by 2002:a25:6e86:: with SMTP id j128mr25789212ybc.456.1574730903370; Mon, 25 Nov 2019 17:15:03 -0800 (PST) In-Reply-To: <4dc457e0135603025cd500acdc95db53f9d30482.camel@peterbenjamin.com> X-Mailer: Apple Mail (2.3601.0.10) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::b33 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <6F7CBE03-C2F4-45CC-91D6-8A72A0C7B3B6@gmail.com> X-Mailman-Original-References: <4dc457e0135603025cd500acdc95db53f9d30482.camel@peterbenjamin.com> Xref: csiph.com gnu.bash.bug:15647 > On 2019 Nov 25 , at 4:43 p, Peter Benjamin = wrote: >=20 >=20 > Description: > 'in' is a builtin command and is not listed in the man page as such. >=20 > Repeat-By: >=20 > type at the bash command line: >=20 > $ in > bash: syntax error near unexpected token `in' This should be a big hint that it is *not* a built-in command. If it were, you would have run the command, not gotten a syntax error. >=20 > Why is this bug report important? Why change the man page? I wasted > 20 minutes of my time, to prove to my satisfaction that 'in' was not > invoking my script at all. Search engines did not find a match to the > error message. I can not imagine this report is the first time this > bug was found. Given that ``in'' *is* documented as a reserved word RESERVED WORDS Reserved words are words that have a special meaning to the = shell. The following words are recognized as reserved when unquoted and = either the first word of a simple command (see SHELL GRAMMAR below) or = the third word of a case or for command: ! case coproc do done elif else esac fi for function if = in select then until while { } time [[ ]] the question becomes, what change to the man page do you think would = have helped you=20 find this more quickly? One thing that comes to mind would be a short (though off-topic) entry = in the SHELL BUILTIN COMMANDS section, like in See the Compound Commands section under SHELL GRAMMMAR. Used to form the ``case'', ``select'', and ``for'' commands. I don't really like that idea, as it starts down a slippery slope for = adding all sorts of non-command entries, turning the section into a general = glossary rather than a listing of built-in commands. Alternatively, maybe a short list of sections at the top of the man page = would provide a hint. For example, imagine the man page started out like this: NAME bash - GNU Bourne-Again Shell SYNOPSIS bash [options] [command_string | file] DESCRIPTION Bash is [...] TABLE OF CONTENTS OPTIONS ARGUMENTS INVOCATION DEFINITIONS RESERVED WORDS SHELL GRAMMAR COMMENTS QUOTING PARAMETERS EXPANSION REDIRECTION ALIASES FUNCTIONS ARITHMETIC EVALUATION CONDITIONAL EXPRESSIONS SIMPLE COMMAND EXPANSION COMMAND EXECUTION COMMAND EXECUTION ENVIRONMENT ENVIRONMENT EXIT STATUS SIGNALS JOB CONTROL PROMPTING READLINE HISTORY HISTORY EXPANSION SHELL BUILTIN COMMANDS RESTRICTED SHELL SEE ALSO FILES AUTHORS BUG REPORTS BUGS OPTIONS All of the single-character shell options ... [etc] The table of contents inserted between the existing DESCRIPTION and = OPTIONS sections is relatively brief, and both RESERVED WORDS and SHELL GRAMMAR seem like they would be good = starting places to look for information about the ``in'' token mentioned in the syntax error. Given how short most of the section names are, it could easily be = formatted as two columns, making it easier to scan. -- Clint=