17 days ago · Tech · hide · Fediverse post

By default, Zsh globs skip hidden files and directories, meaning those with names starting with a dot. For example, in a project directory, * misses all the configuration files and directories: $ ls -d * README.rst generate_pigeon.py To include them, add the (D) glob qualifier, which stands for “dot files”: $ ls -d *(D) .env .git .github .pre-commit-config.yaml .venv README.rst generate_pigeon.py (ls -d lists directories themselves, rather than their contents.) (D) never matches the special . and .. entries, so you don’t need to worry about them popping up in results. Recursive globs (D) matters most for recursive globs with **/, because without it, Zsh also skips hidden directories. For example, to find all YAML files in a repository: $ ls **/*.yml zsh: no matches found: **/*.yml That missed the GitHub configuration files within .github. Add (D) to find them: $ ls **/*.yml(D) .github/dependabot.yml .github/workflows/main.yml Sometimes skipping hidden directories is what you want,…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town