diff options
author | Ron Yorston <rmy@pobox.com> | 2023-09-20 10:06:19 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-09-20 10:06:19 +0100 |
commit | 1ff6eb52032bb52501ef3bd8b49010ac19efa268 (patch) | |
tree | 513deff2b4a6aebe37bb38d1bc5736da2246e183 /include | |
parent | 1fcd57ab583a39f42b55f44d42472ea64e228c84 (diff) | |
download | busybox-w32-1ff6eb52032bb52501ef3bd8b49010ac19efa268.tar.gz busybox-w32-1ff6eb52032bb52501ef3bd8b49010ac19efa268.tar.bz2 busybox-w32-1ff6eb52032bb52501ef3bd8b49010ac19efa268.zip |
ash: add options to control globbing of hidden files
Add shell options:
- 'nohiddenglob' excludes files with the hidden attribute from
globbing
- 'nohidsysglob' excludes files with the hidden and system attributes
from globbing
If both options are enabled 'nohiddenglob' takes precedence.
These options also affect tab completion.
Files that are hidden because they start with a period aren't
affected (unless they also have the hidden attribute).
Costs 160-208 bytes.
(GitHub issue #367)
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index 2cdfac639..bbb3108a9 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -2011,6 +2011,7 @@ unsigned size_from_HISTFILESIZE(const char *hp) FAST_FUNC; | |||
2011 | # endif | 2011 | # endif |
2012 | typedef const char *get_exe_name_t(int i) FAST_FUNC; | 2012 | typedef const char *get_exe_name_t(int i) FAST_FUNC; |
2013 | typedef const char *sh_get_var_t(const char *name) FAST_FUNC; | 2013 | typedef const char *sh_get_var_t(const char *name) FAST_FUNC; |
2014 | typedef int sh_accept_glob_t(const char *name) FAST_FUNC; | ||
2014 | typedef struct line_input_t { | 2015 | typedef struct line_input_t { |
2015 | int flags; | 2016 | int flags; |
2016 | int timeout; | 2017 | int timeout; |
@@ -2024,6 +2025,9 @@ typedef struct line_input_t { | |||
2024 | # if ENABLE_SHELL_ASH || ENABLE_SHELL_HUSH | 2025 | # if ENABLE_SHELL_ASH || ENABLE_SHELL_HUSH |
2025 | /* function to fetch additional application-specific names to match */ | 2026 | /* function to fetch additional application-specific names to match */ |
2026 | get_exe_name_t *get_exe_name; | 2027 | get_exe_name_t *get_exe_name; |
2028 | # if ENABLE_ASH_GLOB_OPTIONS | ||
2029 | sh_accept_glob_t *sh_accept_glob; | ||
2030 | # endif | ||
2027 | # endif | 2031 | # endif |
2028 | # endif | 2032 | # endif |
2029 | # if (ENABLE_FEATURE_USERNAME_COMPLETION || ENABLE_FEATURE_EDITING_FANCY_PROMPT) \ | 2033 | # if (ENABLE_FEATURE_USERNAME_COMPLETION || ENABLE_FEATURE_EDITING_FANCY_PROMPT) \ |