terminalfaker icon indicating copy to clipboard operation
terminalfaker copied to clipboard

Add more common Bash commands.

Open syntaxseed opened this issue 6 years ago • 16 comments

Adding more common Bash commands to flesh out the functionality.

Top desires:

  • mkdir
  • rm for directories

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

NOTES:

  • Commands should be replicas of actual, core Bash commands found on a typical Ubuntu Linux distro & work as similarly as possible.
  • Please model the command's help content after the real help content, and format it like the others (break & 2 spaces after command name & parameters).
  • Please keep commands in alphabetical order.
  • Minimize/avoid external dependencies like yarn or npm packages.

syntaxseed avatar Sep 30 '19 14:09 syntaxseed

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

syntaxseed avatar Oct 01 '19 03:10 syntaxseed

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 😄

godcrampy avatar Oct 01 '19 04:10 godcrampy

Sounds great @godcrampy!

syntaxseed avatar Oct 01 '19 10:10 syntaxseed

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

syntaxseed avatar Oct 01 '19 12:10 syntaxseed

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

deziev avatar Oct 01 '19 17:10 deziev

@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 avatar Oct 01 '19 18:10 syntaxseed

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

syntaxseed avatar Oct 01 '19 20:10 syntaxseed

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))

deziev avatar Oct 02 '19 00:10 deziev

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.

syntaxseed avatar Oct 02 '19 13:10 syntaxseed

How can I help in contributing to the list?

Ojaswy avatar Oct 02 '19 15:10 Ojaswy

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

syntaxseed avatar Oct 02 '19 15:10 syntaxseed

@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

deziev avatar Oct 02 '19 16:10 deziev

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

syntaxseed avatar Oct 03 '19 20:10 syntaxseed

@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

deziev avatar Oct 04 '19 13:10 deziev

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 avatar Oct 10 '19 02:10 syntaxseed

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

syntaxseed avatar Oct 10 '19 03:10 syntaxseed