env: Hide '.' variables in env print by default
When printing all variables with env print, don't print variables that
begin with '.'. If env print is called with a '-a' switch, then
include variables that begin with '.' (just like the ls command).
Variables printed explicitly will be printed even without the -a.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
diff --git a/include/search.h b/include/search.h
index fa00ea1..1e48deb 100644
--- a/include/search.h
+++ b/include/search.h
@@ -107,7 +107,7 @@
int __flag);
extern ssize_t hexport_r(struct hsearch_data *__htab,
- const char __sep, char **__resp, size_t __size,
+ const char __sep, int __flag, char **__resp, size_t __size,
int argc, char * const argv[]);
/*
@@ -120,9 +120,10 @@
const char *__env, size_t __size, const char __sep,
int __flag, int nvars, char * const vars[]);
-/* Flags for himport_r(), hdelete_r(), and hsearch_r() */
+/* Flags for himport_r(), hexport_r(), hdelete_r(), and hsearch_r() */
#define H_NOCLEAR (1 << 0) /* do not clear hash table before importing */
#define H_FORCE (1 << 1) /* overwrite read-only/write-once variables */
#define H_INTERACTIVE (1 << 2) /* indicate that an import is user directed */
+#define H_HIDE_DOT (1 << 3) /* don't print env vars that begin with '.' */
#endif /* search.h */