syntaxseed / terminalfaker

Terminal Faker - A client-side Linux-like cli terminal simulation written in Javascript. Originally forked from AVGP/terminal.js.
MIT License
51 stars 20 forks source link

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

Open syntaxseed opened 5 years ago

syntaxseed commented 5 years ago

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

ghost commented 5 years ago

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

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

syntaxseed commented 5 years ago

@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.

John-Nenniger commented 5 years ago

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!

ghost commented 5 years ago

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

syntaxseed commented 5 years ago

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.