0

I have this strange issue executing the following command on zsh using powerlevel10k. Honestly I have no clue what could be causing it, however, I removed all oh-my-zsh plugins just to try without luck.

The issue is as simple as:

❯ find -name *.yaml
zsh: no matches found: *.yaml

If I go to bash and execute the same command it works as intended

❯ bash
xxxx@merlin:~$ find -name *.yaml
./go/src/github.com/ ... 
{regular result list}

Do you have any ideas ? thanks in advance

2 Answers2

1

The shell is likely to be expanding *.yaml in the current directory (not found), so you need to escape it to make it work in find:

 find -name \*.yaml

If there was a file say suffix xyz.yaml in the current directory, your find command may adjust to explicit match on filename xyz.yaml, and not any ending .yaml:

 find -name xyz.yaml
DuncG
  • 582
0

Another way to prevent shell expansion is to use single quotes around the wildcard character.

find -name '*.yaml'

Kevin
  • 76