Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11296

Re: Worth mentioning in documentation

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail
From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: Worth mentioning in documentation
Date Thu, 6 Aug 2015 16:44:07 -0400
Lines 40
Approved bug-bash@gnu.org
Message-ID <mailman.7901.1438893884.904.bug-bash@gnu.org> (permalink)
References <3156909.AJj7susDjE@debxuan>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1438893884 5840 208.118.235.17 (6 Aug 2015 20:44:44 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Juanma <juan-manuel.menendez@tecsidel.es>
Envelope-to bug-bash@gnu.org
Content-Disposition inline
In-Reply-To <3156909.AJj7susDjE@debxuan>
User-Agent Mutt/1.4.2.3i
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From 139.137.100.1
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11296

Show key headers only | View raw


On Thu, Aug 06, 2015 at 04:13:30PM +0200, Juanma wrote:
> In section ???3.2.4.2 Conditional Constructs??? of Bash docs (both in ???man??? and in the web), at the end, there is an explanation on combining expressions, starting with the use of brackets.
> 
> There it would be worth to mention that:
> 1. you must escape the brackets, also inside script files
> 2. you have to leave blank/s between the brackets and the expression itself

Section 3.2.4.2 of http://www.gnu.org/software/bash/manual/bash.html
is inside 3.2.4 Compound Commands, which is inside 3.2 Shell Commands.
I believe you are talking about the section that discusses the [[ ... ]]
command.

Point 1: I truly have no idea what you mean.  What brackets are you
escaping, and how, and why?

Point 2: Spaces.

Chet chose to omit the phrase "The syntax of ___ is:" from the last few
commands in this section, but you should certainly treat:

[[ ... ]]

     [[ expression ]]

as if it were written:

[[ ... ]]

  The syntax of the [[ ... ]] command is:

     [[ expression ]]

If you treat [[ expression ]] as a formal syntax specifier like those of
"if" and "case", just a few paragraphs up, then the spaces already in
it should be considered as documented.

The manual doesn't explicitly point out that you need spaces after "if"
or "case".  (It fails to mention that you can *omit* the spaces in the
((...)) command, but that's a special exception.)

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Worth mentioning in documentation Greg Wooledge <wooledg@eeg.ccf.org> - 2015-08-06 16:44 -0400

csiph-web