Artificial intelligent assistant

Shell expansion not happening Why are these two commands equivalent (or so it seems based on the results I get back)? I figured the first command wouldn't work because the `*` would be treated as the glob operator but instead it got passed into `grep` just fine and interpreted as a regex pattern. git diff master | grep \\+.*TODO git diff master | grep \\+.\*TODO

A filename glob will only be expanded if there's a matching file in the current directory - otherwise (barring any `nullglob` or `failglob` shell options) it will be passed as-is. So:


$ echo \\+.*TODO
\+.*TODO
$ printf '+foo\
+TODO\
+bar' | grep \\+.*TODO
+TODO


but


$ touch '\+.abcTODO'
$ echo \\+.*TODO
\+.abcTODO
$ printf '+foo\
+TODO\
+bar' | grep \\+.*TODO
$ printf '+foo\
+TODO\
+bar' | grep \\+.\*TODO
+TODO

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 5cab85e0a78520517b2aba305e85c4a7