[Feature request] Flag to exclude hidden directories
Feature request: Flag to exclude hidden directories.
Currently when running sk e.g. in git directory we see sk exploring .git and all subdirectories and files... same in directories with a lot of hidden files.
It would be convenient to have short flag that would allow user to guide skim to focus on non hidden files/ and to not explore hidden directories.
I asked Claude 3.5. Sonnet for TOP suggestions how such flag could be named:
Prompt: 'what would be best short and long name for flag that would instruct sk(im) to exclude hidden directories and files from search? Top 10 proposals of options that are not already used.' + output from sk -h.
Answer:
Here are 10 proposals for short and long flag names to instruct sk(im) to exclude hidden directories and files from search, avoiding options that are already used:
- -H, --no-hidden
- -v, --visible-only
- -E, --exclude-hidden
- -N, --non-hidden
- -P, --public-only
- -O, --omit-hidden
- -S, --skip-hidden
- -R, --reveal-visible
- -D, --display-visible
- -X, --exclude-dot-files
These options provide a mix of intuitive, descriptive, and concise flag names that clearly indicate the functionality of excluding hidden files and directories from the search.
sk is not responsible for filtering these results, only displaying them and allowing you to select them. The input items are sent by another command, which is by default find ..
To achieve what you want, you could set the SKIM_DEFAULT_COMMAND env var to find . \( ! -regex '.*/\..*' \), or run find . \( ! -regex '.*/\..*' \) | sk`