Results 1 to 4 of 4

Thread: rush, a ruby shell bash replacement

  1. #1
    Join Date
    Apr 2007
    Location
    England
    Beans
    225

    rush, a ruby shell bash replacement

    I noticed on rubyplus.org a screencast about a pure ruby unix shell, rush.
    Has anyone tried this? Any comments?

    rush

    I'm a real fan of ruby, and have always wondered why people learn a general purpose mainstream scripting langauge (python,perl,ruby) and bash concurrently.

  2. #2
    Join Date
    Feb 2007
    Beans
    4,045
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: rush, a ruby shell bash replacement

    I gave it a try just now since you mentioned it, by doing the following:
    Code:
    sudo aptitude install git-core rubygems
    git clone git://github.com/adamwiggins/rush.git
    And then to execute:
    Code:
    $ exec rush/bin/rush
    rush> ls
    Exception NameError -> undefined local variable or method `ls' for localhost:Rush::Box
       /tmp/rush/lib/rush/shell.rb:37:in `eval'
       /tmp/(eval):1:in `initialize'
       /tmp/rush/bin/rush:6:in `new'
       /tmp/rush/bin/rush:6
    rush>
    I haven't learnt ruby yet, so all of my initial tries gave errors The examples on the homepage worked though. A bit different way of doing things than sh/bash, that's for sure.

  3. #3
    Join Date
    Apr 2007
    Location
    England
    Beans
    225

    Re: rush, a ruby shell bash replacement

    yeah, I must say that it's also taking me a bit of getting used to

  4. #4
    Join Date
    Jan 2010
    Beans
    19

    Re: rush, a ruby shell bash replacement

    Yeah, you can't just call ls or any random bash command form the main prompt. rush dispenses entirely with the idea of being in a specific directory at any given instant. You have to assign directories to variables and then you can call bash methods on the variables, sometimes in a straightforward manner, as is the case with ls. Others, you have to call directory.bash "ls" or whatever. I'm pretty new to it myself, but I'm pretty comfy with ruby so it's kind of exciting for me. It definitely has it's strengths and its weaknesses, but I kinda like it. For me personally though, I'm gonna have to fuss with it a bit before it will become as functional for me as I would need it to be to switch. (This largely has to do with having to manage ruby version with multiruby for stuff that I work on). I don't know where things were at when you folks were checking it out, but it has a pretty good guide now that will help you get oriented if you feel inclined.

    For me the biggest iffy bit is the directory thing. It has some definite advantages and definite weaknesses. It means you don't have to cd all over the place to be doing things that involve multiple directories or when you need to be switching back and forth between directories, but when all you really need to do is work in one, it can be a bit annoying. The cool part is that if you are a rubyist, the power of the language opens up so many cool possibilities for you.

    Anyway, I see this is an old thread but I thought that I would throw my two sense in.

    Cheers

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •