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

Autocomplete for Files and Directories #25

Closed John-Nenniger closed 4 years ago

John-Nenniger commented 5 years ago

20, makes tab completion work for files and directories for any number of arguments (though it only autocompletes the last word)

I ended up just using TerminalUtilites.getFsUnit within the autoCompleteFiles function instead of doing a more significant refactor, which looks okay to me, though I can do more of a refactor if wanted.

syntaxseed commented 4 years ago

This PR needs a rebase. We just refactored the project in PR #23 to use ES6 and WebPack.

John-Nenniger commented 4 years ago

This is ready to go now. Sorry about all the commits, I haven't done a lot of rebasing so i left in some code I shouldn't have.

After the PR #23 autocompleting the commands only works with some commands (the ones defined in customCommands.js), and this branch doesn't fix that problem: #27

syntaxseed commented 4 years ago

I'd prefer to have this completely working, and without some old code left in. I'm already concerned that the codebase is getting pretty disorganized. Especially with a PR this large. If you have time @John-Nenniger to put the finishing touches on it, that would be great. No rush. I am taking a bit of a break over the Christmas season.

Thanks!

syntaxseed commented 4 years ago

Awesome I will check this out soon.

syntaxseed commented 4 years ago

This is absolutely awesome. It doesn't work with the ls command for some reason, maybe because it's too short?

Regardless, thanks for this PR, really nice enhancement to this project. :+1:

syntaxseed commented 4 years ago

Thanks again @John-Nenniger. Added you to the contributors list in the readme. :)