Subject: [PATCH 2/5] checkbashisms: detect the use of the 'jobs' built-in

From: Raphael Geissert <[email-masked]>
Date: Thu, 27 May 2010 10:00:02 -0500

The jobs built-in is only part of the "User Portability Utilities."
Additionally add a commented-out check for calls to 'jobs' with options
other than those specified by SUSv3.

Signed-off-by: Raphael Geissert <[email-masked]>
---
 scripts/checkbashisms.pl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index 645295a..3b487d0 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -546,6 +546,8 @@ sub init_hashes {
 	$LEADIN . qr'printf\s+-v' => q<'printf -v var ...' should be var='$(printf ...)'>,
 	$LEADIN . qr'coproc\s' =>        q<coproc>,
 	qr';;?&' =>  q<;;& and ;& special case operators>,
+	$LEADIN . qr'jobs\s' =>  q<jobs>,
+#	$LEADIN . qr'jobs\s+-[^lp]\s' =>  q<'jobs' with option other than -l or -p>,
     );
 
     %string_bashisms = (
-- 
1.7.1