svn commit: r265865 - head/usr.bin/look

Eitan Adler eadler at FreeBSD.org
Sun May 11 02:00:49 UTC 2014


Author: eadler
Date: Sun May 11 02:00:48 2014
New Revision: 265865
URL: http://svnweb.freebsd.org/changeset/base/265865

Log:
  look(1): add compability with other implementations.
  
  On other implementations 'look -a' uses an alternate dictionary.  Since we don't
  have one, just ignore it.

Modified:
  head/usr.bin/look/look.1
  head/usr.bin/look/look.c

Modified: head/usr.bin/look/look.1
==============================================================================
--- head/usr.bin/look/look.1	Sun May 11 01:58:56 2014	(r265864)
+++ head/usr.bin/look/look.1	Sun May 11 02:00:48 2014	(r265865)
@@ -103,6 +103,10 @@ in comparisons when the
 option was specified.
 This was incorrect and the current man page matches the historic
 implementation.
+.Pp
+The
+.Fl a
+flag is ignored for compability.
 .Sh SEE ALSO
 .Xr grep 1 ,
 .Xr sort 1

Modified: head/usr.bin/look/look.c
==============================================================================
--- head/usr.bin/look/look.c	Sun May 11 01:58:56 2014	(r265864)
+++ head/usr.bin/look/look.c	Sun May 11 02:00:48 2014	(r265865)
@@ -102,8 +102,11 @@ main(int argc, char *argv[])
 
 	file = _path_words;
 	termchar = L'\0';
-	while ((ch = getopt(argc, argv, "dft:")) != -1)
+	while ((ch = getopt(argc, argv, "adft:")) != -1)
 		switch(ch) {
+		case 'a':
+			/* COMPATIBILITY */
+			break;
 		case 'd':
 			dflag = 1;
 			break;


More information about the svn-src-head mailing list