The following question asks What do double-asterisk (**) wildcards mean?
Many answers there indicate that **
includes the current directory as well as sub-directories.
However, when I test this in a bash console it only appears to list files from sub-directories. The following both list only sub-directory files
$ find **/*.md
docs/architecture.md
docs/autodetect.md
# ...
$ ls -d **/*.md
docs/architecture.md
docs/autodetect.md
# ...
Despite there being .md files in the current directory
$ ls -d *.md
CODE_OF_CONDUCT.md CONTRIBUTING.md README.md SECURITY.md
Am I misunderstanding the answers to the referenced question, or am I testing the pattern incorrectly?
How can I be sure a command in a script operates on files in both the current directory and sub-directories?