]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - misc-utils/look.c
logger: (man) add info about rewrite and authors
[thirdparty/util-linux.git] / misc-utils / look.c
index a0d898db12328d29bdaa8886f21e187eb96dd455..d2699bfdd695c2dc963c23601f08a94e7a62c226 100644 (file)
@@ -104,7 +104,11 @@ main(int argc, char *argv[])
 
        setlocale(LC_ALL, "");
 
-       file = _PATH_WORDS;
+       if ((file = getenv("WORDLIST")) && !access(file, R_OK))
+               /* use the WORDLIST */;
+       else
+               file = _PATH_WORDS;
+
        termchar = '\0';
        string = NULL;          /* just for gcc */
 
@@ -365,9 +369,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -t, --terminate <char>   define the string-termination character\n"), out);
 
        fputs(USAGE_SEPARATOR, out);
-       fputs(USAGE_HELP, out);
-       fputs(USAGE_VERSION, out);
-       fprintf(out, USAGE_MAN_TAIL("look(1)"));
+       printf(USAGE_HELP_OPTIONS(26));
+       printf(USAGE_MAN_TAIL("look(1)"));
 
        exit(EXIT_SUCCESS);
 }