From owner-svn-src-head@freebsd.org Sat Aug 1 17:27:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1ED99B0970; Sat, 1 Aug 2015 17:27:48 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91A387C3; Sat, 1 Aug 2015 17:27:48 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t71HRmsZ049932; Sat, 1 Aug 2015 17:27:48 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t71HRms2049931; Sat, 1 Aug 2015 17:27:48 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201508011727.t71HRms2049931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sat, 1 Aug 2015 17:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286159 - head/usr.bin/getopt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Aug 2015 17:27:48 -0000 Author: jmg Date: Sat Aug 1 17:27:47 2015 New Revision: 286159 URL: https://svnweb.freebsd.org/changeset/base/286159 Log: use : instead of true... Change file file to file1 file2, partly for igor, and partly because it's odd to pass the same file to a command twice.. Modified: head/usr.bin/getopt/getopt.1 Modified: head/usr.bin/getopt/getopt.1 ============================================================================== --- head/usr.bin/getopt/getopt.1 Sat Aug 1 16:27:52 2015 (r286158) +++ head/usr.bin/getopt/getopt.1 Sat Aug 1 17:27:47 2015 (r286159) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd January 26, 2011 +.Dd August 1, 2015 .Dt GETOPT 1 .Os .Sh NAME @@ -62,7 +62,7 @@ set \-\- $args # You cannot use the set command with a backquoted getopt directly, # since the exit code from getopt would be shadowed by those of set, # which is zero by definition. -while true; do +while :; do case "$1" in \-a|\-b) echo "flag $1 set"; sflags="${1#-}$sflags" @@ -83,10 +83,10 @@ echo "oarg is '$oarg'" .Pp This code will accept any of the following as equivalent: .Bd -literal -offset indent -cmd \-aoarg file file -cmd \-a \-o arg file file -cmd \-oarg -a file file -cmd \-a \-oarg \-\- file file +cmd \-aoarg file1 file2 +cmd \-a \-o arg file1 file2 +cmd \-oarg -a file1 file2 +cmd \-a \-oarg \-\- file1 file2 .Ed .Sh SEE ALSO .Xr getopts 1 ,