Browse Source

made a readme

John Pasquarello 1 year ago
parent
commit
401234482e
1 changed files with 33 additions and 0 deletions
  1. 33 0
      README.md

+ 33 - 0
README.md

@@ -0,0 +1,33 @@
+# rubysh
+## It's pronounced like rubbish
+
+### What is it?
+Rubysh is a little DSL that scans your systems PATH and exposes everything there as a funtion. For example:
+```ruby
+-pwd
+-ls(" -a")
+```
+would be equivalent to 
+```ruby
+system("pwd")
+system("ls -a")
+```
+
+If you use a + instead of a minus the commend is run as a sub process and the stdout is returned to ruby as a string.
+```ruby
+output = +ls
+p output #would be the contents of your current directory
+```
+
+You can also pipe commands together like in a bash script
+```ruby
+-curl("-s","https://www.johnlp.xyz").grep("\"<i>\"")
+```
+
+Lastly you can also pipe arbitrary strings into a commands stdin like so
+```ruby
+"input".grep("-ro [nu]")
+```
+
+
+yes I know this is a crime. thank you for your patronage.