Closed elyscape closed 7 years ago
@elyscape Thanks for such an awesome issue report! Seriously, kudos! π
I'm using GNU utils, as I think you've probably guessed, so that's probably why this one fell through the cracks.
I'll get a fix out shortly π
@dsifford I should note that having sort
in the pipeline isn't necessary. Bash will sort the completions you provide it. I only put it in my commands to ensure that the output on the command line matched the output from the tab completion.
If I type
yarn why
and then try to tab complete, it gives me a list that looks like this:There are two problems with this. The first is that each item has a leading slash. This is because I am running on macOS, which uses BSD find, which includes the search path verbatim in the results. Running the find command used in the script yields these results:
This can be easily fixed by changing the command to use
node_modules
:By adding
-mindepth 1
, we don't have to even think about the folder itself:The other issue is that
.bin
is included in the list, and it really probably shouldn't be. This can be handled by adding-not -name .bin
to the arguments: