skim icon indicating copy to clipboard operation
skim copied to clipboard

[Feature request] Flag to exclude hidden directories

Open gwpl opened this issue 1 year ago • 1 comments

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.

gwpl avatar Jul 17 '24 20:07 gwpl

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:

  1. -H, --no-hidden
  2. -v, --visible-only
  3. -E, --exclude-hidden
  4. -N, --non-hidden
  5. -P, --public-only
  6. -O, --omit-hidden
  7. -S, --skip-hidden
  8. -R, --reveal-visible
  9. -D, --display-visible
  10. -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.

gwpl avatar Jul 19 '24 12:07 gwpl

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`

LoricAndre avatar Nov 08 '24 11:11 LoricAndre