diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-12-11 22:16:23 -0600 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-12-13 11:46:55 -0700 |
commit | be11235ab802844e12d84921a38fd8ae4ddda080 (patch) | |
tree | 3ae5bb11aec34357c28bb46ed9ed66ad94f9f63f /include/search.h | |
parent | ec8a252cd492a7a409d6912aebeff34bb9e1e1e1 (diff) |
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>
Diffstat (limited to 'include/search.h')
-rw-r--r-- | include/search.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/search.h b/include/search.h index fa00ea1b359..1e48deb1cf0 100644 --- a/include/search.h +++ b/include/search.h @@ -107,7 +107,7 @@ extern int hdelete_r(const char *__key, struct hsearch_data *__htab, 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 @@ extern int himport_r(struct hsearch_data *__htab, 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 */ |