Revision: 710
http://svn.savannah.gnu.org/viewvc/?view=rev&root=administration&revision=710
Author: iank
Date: 2023-12-12 21:02:05 -0500 (Tue, 12 Dec 2023)
Log Message:
-----------
(2/2) [bash-style-guide.mdwn]: fix square brackets rendering
>From ebe3dc520ce26b3dca1281b146b87d924fd551ac Mon Sep 17 00:00:00 2001
From: bill-auger <[email protected]>
Date: Tue, 12 Dec 2023 19:52:45 -0500
Subject: [PATCH 2/2] [bash-style-guide.mdwn]: fix square brackets rendering
Modified Paths:
--------------
trunk/sviki/fsf/bash-style-guide.mdwn
Modified: trunk/sviki/fsf/bash-style-guide.mdwn
===================================================================
--- trunk/sviki/fsf/bash-style-guide.mdwn 2023-12-13 02:02:01 UTC (rev
709)
+++ trunk/sviki/fsf/bash-style-guide.mdwn 2023-12-13 02:02:05 UTC (rev
710)
@@ -439,13 +439,10 @@
Never use `[`. `[[` is a special syntax which doesn't do variable expansion
and avoids edge cases.
-Note: ikiwiki has trouble formatting the double bracket below, get the
-raw page with `git svn clone --stdlayout
svn://svn.savannah.gnu.org/administration/`
-
```
-[[ "$filename" == *.png ]] # right-hand globs over left-hand - matches
filename with .png extension
+\[[ "$filename" == *.png ]] # right-hand globs over left-hand - matches
filename with .png extension
# Quote only the right-hand side when globbing is not desired.
-[[ "$filename" == "*.png" ]] # matches filename with literal asterisk "*.png"
+\[[ "$filename" == "*.png" ]] # matches filename with literal asterisk "*.png"
```
Use double-equal for string equality, eg: `[[ "$x" == 2 ]]`.