On Thu, Dec 3, 2020 at 11:23 AM José Valim <jose.va...@dashbit.co> wrote: > > Thanks Frank, this sounds good to me. Perhaps the only change I would do is > to use FIle.ls instead of Path.wildcard. Basically split anything after the > last "/", ls the directory, and then do String.starts_with?(results, last). > It will also protect us from wildcard characters and so on. What do you > think? Would you like to send a PR?
Funny enough, that was my first try. It had two issues: 1. I was concerned that tab completion in a directory with tons of files would result in large lists being passed around and that Path.wildcard could filter earlier, and 2. there was an annoying edge case (with handling dots, I think) and Path.wildcard was particularly convenient for working around that. At any rate, I'll look again for the PR, since I agree that filtering wildcards doesn't seem right. Yes, I'll send a PR. I'm feeling slow given that a lot is going on this week, but I'm on it! (And I'll collect and incorporate any other comments posted here too) Thanks! Frank -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CA%2B-urNSWw__tZpA8j6FkdEnsbYq37jC%3DbVT3ubNCmRqQU3i7cg%40mail.gmail.com.