syntaxseed/terminalfaker

Make tab-completion work with paths and filenames not just command names.

Opened this issue · 5 comments

Hitting tab will attempt to complete command names... but doesn't work with paths or filenames.

It seems to me the easiest way to do this would be to run ls in the autoCompleteInput function. It would require either:

  • a refactor of the ls execution since it returns a <pre> wrapped element, or
  • stripping the element and converting it to an array in autoCompleteInput itself.

Let me know which you think would work best and I'll start on it.

@jacob-shu it might be best to create a generic helper that both ls and the autocomplete functions can make use of. Most of the cruft in the ls command is just formatting.

Hello!

I found this repo while looking for open source projects to contribute to, looks awesome!

@jacob-shu have you made any progress on this problem? I took a look before realizing that you said you'd start on it, though I only got as far as the refactor problem you mentioned earlier. I'm happy to keep working on it, or I can look into another issue, like the localStorage problem. Sorry about that!

Hi @John-Nenniger, I haven't done anything appreciable on this issue yet. Feel free to keep going on it!

Thanks for your help.

@John-Nenniger Note that PR #23 will be merged in next. And might conflict with this work. So have a look there, and/or give me a few days to review it and I'll merge it in.