4 ms·
There was an incorrect example on the copilot.github.com landing page which I was surprised by. I'm guessing someone noticed it because it's been taken off the
by quicklime 5y ago
There was an incorrect example on the copilot.github.com landing page which I was surprised by. I'm guessing someone noticed it because it's been taken off the page.
It was in a file called "find_files.sh", and the command it generated was something like:
> find .... -exec ... {}\;
The problem is that there's no whitespace between the {} and \; and this is rejected by both GNU and BSD find.
It might've just been a mistake that someone made while putting the landing page together. But if it was generated, then how?? I can't imagine there are many (if any) instances of "{}\;" in the training data, since it's not a valid invocation of the find command...
- tyingq 5y agoHere it is, courtesy of a wayback snapshot[1] #!/bin/bash # List all python source files which are more than 1KB and contain the word "copilot". find . \ -name "\*.py" \ -size +1000 \ -exec grep -n copilot {}\; [1] https://web.archive.org/web/20210701061847if_/https://copilot.github.com/ https://web.archive.org/web/20210701061847if_/https://copilo...
- onionisafruit 5y agoThe missing space isn't the only thing wrong there. - This lists the lines containing copilot instead of the files. You want `grep -l` to list the files. - `--size +1000` finds files with over 1000 blocks. `--size +1000c` gets you files over 1KB. - `-name "*.py"` only finds files literally named `.py`. To find files that match the glob `.py`, you would single quote it like `-name '*.py'`