Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Rush is a replacement for the Unix shell (bash, zsh, etc) which uses pure Ruby syntax (heroku.com)
34 points by pius on Feb 22, 2008 | hide | past | favorite | 7 comments


I think Rush is a bad way to interact with Unix.

Another comment already mentioned that there is presently no way to provide arguments to a command. That was the first thing I was looking for, myself. It did not even support the syntax Capistrano promotes by using an underscore, such as my_dir.ls_la, and that's a shame.

Of course, we could use #system to invoke a Bourne shell to run any command, but that's too much overhead for heavy use, so that option does not matter.

One of the most important things a shell does is piping. Rush does allow one to get away from needing to pipe through commands like grep, wc, awk, and sed, but you cannot get away from the fact that there are cases where you just have to pipe data between commands that have a complex relationship with that data that you would not want to recreate within Rush. For Rush to have a chance of being considered seriously, it also needs to address pipes and make them easy to invoke.


This is just fantastic. How do you invoke arbitrary programs with option arguments? I saw you can use dir["file.txt"].vi, what if i want to run

  <someprog> <someoptions> <somefile>

?


It's not possible at the moment.

You can pass options to vi/textmate by passing a string to the respective method as an argument.

A generalisation should be possible by resolving the PATH and adding the various executables as methods to the appropriate classes. The metaprogramming abilities of Ruby should make this a breeze.


I hate to ask a stupid question because it's probably in your docs somewhere, but could you humor my laziness and tell me if it's easy/hard to extend this at will? I think if you had some way for people to easily add the ruby counterpart of a bash command and then share them with others, this could really be nice.

Beautiful idea either way. I like the idea of interacting with your OS the same way you would interact with irb or the lisp REPL.


The first question that comes to mind is: "Are there any security issues with using this?"


Actually, that's the last question that would enter my mind. First, I want to USE it, see if I enjoy it and _then_ fix any likely security issues, if at all!

That's just me, though.


So is that pronounced roosh?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: