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

Add more common Bash commands. #1

Open syntaxseed opened 5 years ago

syntaxseed commented 5 years ago

Adding more common Bash commands to flesh out the functionality.

Top desires:

Will pause adding new commands after the above 2 to do some major refactoring before adding a bunch of new commands.

NOTES:

syntaxseed commented 5 years ago

Current list of commands as of v 1.4.1:

cat cd clear cow decrypt echo encrypt hello help history ls reboot rm touch version

godcrampy commented 5 years ago

Hi! I'd like to contribute to your project. I cloned the project and could implement the pwd bash command. I am looking forward to implement more commands 😄

syntaxseed commented 5 years ago

Sounds great @godcrampy!

syntaxseed commented 5 years ago

Current list of commands as of v1.4.2:

cat cd clear cow decrypt echo encrypt hello help history ls pwd reboot rm touch version

deziev commented 5 years ago

Hi! im interested in this project and would like to make some contributions. I want try to implement something like linux man page for every command which would prompt output to screen (not editor like in real linux). It could be easily done by using this project http://linuxcommand.org/lc3_man_pages/wc1.html

syntaxseed commented 5 years ago

@deziev well unfortunately the commands don't have the full functionality of their Linux counterparts (like switches or optional parameters, etc) so there wouldn't be anything to really put in a man page beyond what you can already see via:

help [command]

So the info wouldn't be accurate.

syntaxseed commented 5 years ago

Commands as of version 1.4.3:

base64dec base64enc cat cd clear cow decrypt echo encrypt hello help history ls pwd reboot rm touch version

deziev commented 5 years ago

So the info wouldn't be accurate.

@syntaxseed Well, that's make sense. Btw, im currently working on refactoring of filesystem module. u can check it out in my fork https://github.com/deziev/terminalfaker/blob/fs-refactor/js/filesystem.js I've been using some oop magic and SOLID principles to make it lot easier to manage filesystem stuff and implement commands such as mkdir, rm, mv, cp, ls and pwd maybe even symlinks. I’m eager to receive your feedback on this))

syntaxseed commented 5 years ago

This is looking great! I knew I wanted something a lot more robust, and this is along what I was thinking.

Thanks for the help.

Also please be sure to comment it well when you're done. :)

@deziev you might also want to look at the path class I had started creating.

Ojaswy commented 5 years ago

How can I help in contributing to the list?

syntaxseed commented 5 years ago

@Ojaswy the biggest glaring thing we are missing is some kind of very basic way to edit the contents of a file.

deziev commented 5 years ago

@syntaxseed I think nano-like editor is our solution. Its not that hard to implement it with modal windows in html. Here is my attempt on it

editor-example

syntaxseed commented 5 years ago

@deziev that is cool! but can the window be inline or perfectly overlayed on the terminal so that it looks like how nano behaves as we use it in a regular terminal? Ie not look like its floating.

deziev commented 5 years ago

@syntaxseed just playing around with some html tags, was not planing to implement full editor :D I made it to illustrate my vision on how editor suppose to look in project. It would be better to open up new issue for nano editor without filesystem usage. #13 should not cause any problem with that

syntaxseed commented 5 years ago

Implemented the following:

Append to a file: echo "some data for the file" >> fileName

Overwrite file contents: echo "some data for the file" > fileName

syntaxseed commented 5 years ago

Command list as of v 1.5.2:

add base64dec base64enc cat cd clear cow decrypt echo encrypt hello help history ls pwd reboot rm touch version