coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test: hidden files


From: Marton Kun-Szabo
Subject: test: hidden files
Date: Thu, 10 Aug 2017 15:55:34 -0700

Dear coreutils-dev,

I'd like to add a new feature to "test" that checks whether a file exists
and is hidden (the first character of the filename is a dot). I think this
is a useful and universal feature that is currently missing from "test" and
is not on the list of rejected features yet.
The "-H' argument is currently unused, the main modification would look
like this:

src/test.c

+    case 'H':           /* File is hidden? */
+      unary_advance ();
+      return (stat (argv[pos - 1], &stat_buf) == 0
+              && (argv[pos - 1][0] == '.'));
+

I would be happy to implement this feature along with all the necessary
documentation (both in coreutils.texi and in the "--help" section) and
submit a patch when everything is done.

Questions:
 1) Is this a useful feature? Or would it end up on the list of rejected
features?
 2) Any planned other use of the "H" argument in the future?
 3) Any comments on the above implementation?

Thanks, regards,
Marton Kun-Szabo


reply via email to

[Prev in Thread] Current Thread [Next in Thread]