f



irb and unix shells

Can you use irb in place of shells like bash or rc?
0
12/2/2007 12:26:41 AM
comp.lang.ruby 48886 articles. 0 followers. Post Follow

35 Replies
589 Views

Similar Articles

[PageSpeed] 53

> Can you use irb in place of shells like bash or rc?

not really, but kinda, yeah.

you can do "system ('any unix command')" from inside irb really
easily, and you could also set up a method which automatically took
any input you gave irb and passed that along to system, but you
wouldn't get tab-completion, you'd have to manually print the strings
you received back - they come back with newline escape sequences
rather than newlines - and I really don't know how you would be able
to get system (or backticks, which do almost exactly the same thing)
to load your .profile or .foo_shrc files.

you can do pretty much anything you want in Unix from within irb, but
actual Unix shells remain the best way to do it. (although I think
there was an actual irb shell written, so I could be wrong.)

-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/2/2007 12:45:02 AM
On Dec 1, 2007, at 6:45 PM, Giles Bowkett wrote:

>> Can you use irb in place of shells like bash or rc?
>
> not really, but kinda, yeah.
>
> you can do "system ('any unix command')" from inside irb really
> easily, and you could also set up a method which automatically took
> any input you gave irb and passed that along to system, but you
> wouldn't get tab-completion, you'd have to manually print the strings
> you received back - they come back with newline escape sequences
> rather than newlines - and I really don't know how you would be able
> to get system (or backticks, which do almost exactly the same thing)
> to load your .profile or .foo_shrc files.
>
> you can do pretty much anything you want in Unix from within irb, but
> actual Unix shells remain the best way to do it. (although I think
> there was an actual irb shell written, so I could be wrong.)
>
> --  
> Giles Bowkett
>
> Podcast: http://hollywoodgrit.blogspot.com
> Blog: http://gilesbowkett.blogspot.com
> Portfolio: http://www.gilesgoatboy.org
> Tumblelog: http://giles.tumblr.com
>
Some day, some day, somebody smarter and more ambitious than me will  
build that Ruby-native shell with all the joy of Ruby and command  
line tools integrated...

0
12/2/2007 2:35:17 AM
John Joyce wrote:

> 
> On Dec 1, 2007, at 6:45 PM, Giles Bowkett wrote:
> 
>>> Can you use irb in place of shells like bash or rc?
>>
>> not really, but kinda, yeah.
>>
>> you can do "system ('any unix command')" from inside irb really
>> easily, and you could also set up a method which automatically took
>> any input you gave irb and passed that along to system, but you
>> wouldn't get tab-completion, you'd have to manually print the strings
>> you received back - they come back with newline escape sequences
>> rather than newlines - and I really don't know how you would be able
>> to get system (or backticks, which do almost exactly the same thing)
>> to load your .profile or .foo_shrc files.
>>
>> you can do pretty much anything you want in Unix from within irb, but
>> actual Unix shells remain the best way to do it. (although I think
>> there was an actual irb shell written, so I could be wrong.)
>>
>> --
>> Giles Bowkett
>>
>> Podcast: http://hollywoodgrit.blogspot.com
>> Blog: http://gilesbowkett.blogspot.com
>> Portfolio: http://www.gilesgoatboy.org
>> Tumblelog: http://giles.tumblr.com
>>
> Some day, some day, somebody smarter and more ambitious than me will
> build that Ruby-native shell with all the joy of Ruby and command
> line tools integrated...

Thanks to both of you and I can only hope that somebody comes along soon. I
wish I had the experience and skill to do it my self, but multiple failure
with other big and ambitious projects I took on taught me some humility.
0
12/2/2007 3:50:15 AM
This is one of those questions where consulting with rubyforge.org can
be helpful.  ;)

  http://rubyforge.org/projects/rbsh/

I can't speak for it, I haven't really used it.

Cameron

0
12/2/2007 3:44:10 PM
> Some day, some day, somebody smarter and more ambitious than me will
> build that Ruby-native shell with all the joy of Ruby and command
> line tools integrated...

hehe working on that with my limited abilities...;)

Unfortunately, aside from time problems, I found two stop things:

First, I need something that can replace irb easily, so that you
get all the important functionality of irb and which has
sufficient docu to allow "normal" programmers unterstand
what is going on (understanding how IRB works is possible,
but i found it takes a lot of time, and isnt as fun as
starting from scratch)
Something that is as flexible as irb-in-a-browser too,
but for some reason I didnt find this very easy...

Second, I still have no real way on how to do piping of
objects/data with a ruby shell. (After all we are talking of a
real shell, no? One like in bash where you can apply filters...)

And also... ruby-ncurses would be nice to have, so that we
can get zsh-like "borders" around a prompt (and RPROMPT etc..
etc.. etc..)

But for now its a lot easier to replace all t he simple unix
tools in pure ruby... thats not that difficult, just
quite some work


"but you wouldn't get tab-completion"
Well you can, with Readline.readline and using a proc
object for tab completion. The docu is a little bit weird,
but with a little help i got that to work.
-- 
Posted via http://www.ruby-forum.com/.

0
shevegen (524)
12/2/2007 6:05:23 PM
> "but you wouldn't get tab-completion"
> Well you can, with Readline.readline and using a proc
> object for tab completion. The docu is a little bit weird,
> but with a little help i got that to work.

Is there a way to integrate that with irb? A Unix shell with .irbrc
special sauce would be pretty nifty. Although I have to admit I
haven't got the hang of it yet:

 !  ruby ruby_shell.rb
RubyShell> ls (tab)
svn/          ruby_shell/    ruby_shell.rb
RubyShell> ls ../README
RubyShell> ls -l !$
RubyShell> ls -l ../README
ls: fts_open: No such file or directory

-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/2/2007 7:29:39 PM
On Dec 2, 1:29 pm, Giles Bowkett <gil...@gmail.com> wrote:
> > "but you wouldn't get tab-completion"
> > Well you can, with Readline.readline and using a proc
> > object for tab completion. The docu is a little bit weird,
> > but with a little help i got that to work.
>
> Is there a way to integrate that with irb?

Tab completion? Already in there. In .irbrc...

require 'irb/completion'

> A Unix shell with .irbrc
> special sauce would be pretty nifty. Although I have to admit I
> haven't got the hang of it yet:
>
>  !  ruby ruby_shell.rb
> RubyShell> ls (tab)
> svn/          ruby_shell/    ruby_shell.rb
> RubyShell> ls ../README
> RubyShell> ls -l !$
> RubyShell> ls -l ../README
> ls: fts_open: No such file or directory
>
> --
> Giles Bowkett
>
> Podcast:http://hollywoodgrit.blogspot.com
> Blog:http://gilesbowkett.blogspot.com
> Portfolio:http://www.gilesgoatboy.org
> Tumblelog:http://giles.tumblr.com

Regards,
Jordan
0
MonkeeSage (654)
12/3/2007 2:20:53 AM
> Tab completion? Already in there. In .irbrc...
>
> require 'irb/completion'

I know - got it already. Talking abut Unix tab completion. (That
happens in ruby_shell, but I don't know how.)

-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/3/2007 3:21:53 AM
Hi,

I have downloaded Rails-1.2.6.zip manually as my proxy settings are
restricting Ruby to do it automatically.

Now that Rails-1.2.6.zip is with me.. To which directory should I
extract these files to.=20

Thanks in advance
Gowrisankar. narayan


DISCLAIMER:
This message contains privileged and confidential information and is =
intended only for an individual named. If you are not the intended =
recipient, you should not disseminate, distribute, store, print, copy or =
deliver this message. Please notify the sender immediately by e-mail if =
you have received this e-mail by mistake and delete this e-mail from =
your system. E-mail transmission cannot be guaranteed to be secure or =
error-free as information could be intercepted, corrupted, lost, =
destroyed, arrive late or incomplete or contain viruses. The sender, =
therefore,  does not accept liability for any errors or omissions in the =
contents of this message which arise as a result of e-mail transmission. =
If verification is required, please request a hard-copy version.

0
12/3/2007 3:33:36 AM
On Dec 2, 9:21 pm, Giles Bowkett <gil...@gmail.com> wrote:
> > Tab completion? Already in there. In .irbrc...
>
> > require 'irb/completion'
>
> I know - got it already. Talking abut Unix tab completion. (That
> happens in ruby_shell, but I don't know how.)
>
> --
> Giles Bowkett
>
> Podcast:http://hollywoodgrit.blogspot.com
> Blog:http://gilesbowkett.blogspot.com
> Portfolio:http://www.gilesgoatboy.org
> Tumblelog:http://giles.tumblr.com

I figured you would already know that, which is why I was confused.
Sorry about that. :) I've no idea about bash completion either.

Regards,
Jordan
0
MonkeeSage (654)
12/3/2007 6:57:27 AM
On Dec 1, 2007 9:55 PM, Robert Jones <robertjones21@hotpop.com> wrote:
> > Some day, some day, somebody smarter and more ambitious than me will
> > build that Ruby-native shell with all the joy of Ruby and command
> > line tools integrated...

A group of developers, including the author of rbsh, recently got
together for just such a project.
http://rubyunix.rubyforge.org/

We're still working out the design and putting together everyone's
ideas, but an interactive shell, ability to run UNIX shell scripts,
and other such things are among our goals.

Daniel Brumbaugh Keeney

0
12/3/2007 4:50:52 PM
That's extremely nifty. I also like the name: rush. I recommend using
the 2112 cover art for maxiumum effect.

On 12/3/07, Daniel Brumbaugh Keeney <devi.webmaster@gmail.com> wrote:
> On Dec 1, 2007 9:55 PM, Robert Jones <robertjones21@hotpop.com> wrote:
> > > Some day, some day, somebody smarter and more ambitious than me will
> > > build that Ruby-native shell with all the joy of Ruby and command
> > > line tools integrated...
>
> A group of developers, including the author of rbsh, recently got
> together for just such a project.
> http://rubyunix.rubyforge.org/
>
> We're still working out the design and putting together everyone's
> ideas, but an interactive shell, ability to run UNIX shell scripts,
> and other such things are among our goals.
>
> Daniel Brumbaugh Keeney
>
>


-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/3/2007 7:44:55 PM
> > I know - got it already. Talking abut Unix tab completion. (That
> > happens in ruby_shell, but I don't know how.)
>
> I figured you would already know that, which is why I was confused.
> Sorry about that. :) I've no idea about bash completion either.

No worries. :-)

-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/3/2007 7:45:16 PM
Hello --

On 03/12/2007, Giles Bowkett <gilesb@gmail.com> wrote:
> That's extremely nifty. I also like the name: rush. I recommend using
> the 2112 cover art for maxiumum effect.

Some of us are working on the rubyunix project:

http://rubyunix.rubyforge.org/

-- Thomas Adam

0
12/3/2007 7:57:33 PM
excellent! can't wait for it.

On Dec 3, 2007 8:50 AM, Daniel Brumbaugh Keeney
<devi.webmaster@gmail.com> wrote:
> On Dec 1, 2007 9:55 PM, Robert Jones <robertjones21@hotpop.com> wrote:
> > > Some day, some day, somebody smarter and more ambitious than me will
> > > build that Ruby-native shell with all the joy of Ruby and command
> > > line tools integrated...
>
> A group of developers, including the author of rbsh, recently got
> together for just such a project.
> http://rubyunix.rubyforge.org/
>
> We're still working out the design and putting together everyone's
> ideas, but an interactive shell, ability to run UNIX shell scripts,
> and other such things are among our goals.
>
> Daniel Brumbaugh Keeney
>
>

0
12/3/2007 9:35:41 PM
Thomas Adam wrote:
> Hello --
> 
> On 03/12/2007, Giles Bowkett <gilesb@gmail.com> wrote:
>> That's extremely nifty. I also like the name: rush. I recommend using
>> the 2112 cover art for maxiumum effect.
> 
> Some of us are working on the rubyunix project:
> 
> http://rubyunix.rubyforge.org/
> 
> -- Thomas Adam

Have you guys also looked at the hotwire project (a new python-shell)
http://code.google.com/p/hotwire-shell/
It has some interesting ideas.

Edwin
-- 
Posted via http://www.ruby-forum.com/.

0
edder (38)
12/3/2007 11:15:50 PM
I still think if it borrows lots from bash, it should be called rash,  
not rush.

0
12/4/2007 12:33:51 AM
> I still think if it borrows lots from bash, it should be called rash,
> not rush.

no way, dude. that's like slime, the lisp environment. I don't care
how awesome it is, I'm not working in slime.

I definitely and vigorously vote against rash and in favor of rush.

-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/4/2007 1:00:10 AM
On Dec 3, 2007, at 8:00 PM, Giles Bowkett wrote:

> I definitely and vigorously vote against rash and in favor of rush.

In honor of how Rails and Rolls are both named after drugs, I think  
the shell should be named after some hard drug.

Like maybe 'Rocks', which is slang for crack cocaine.

-Ari

0
fedzor (156)
12/4/2007 1:11:23 AM
On Dec 3, 2007 3:15 PM, Edwin Van leeuwen <edder@tkwsping.nl> wrote:

> Have you guys also looked at the hotwire project (a new python-shell)
> http://code.google.com/p/hotwire-shell/
> It has some interesting ideas.

http://www.scsh.net/ likewise, though the focus there is more on
scripting than interactivity.

martin

0
12/4/2007 1:51:59 AM
rash: terrible
rush: terrible

mogok! it sounds cool, it's related to rubies, erm, and apparently has
a violent and oppressive history...

hey it would also be humanitarian in how it brings to light an issue
that people might not have thought about?

90% of the world's rubies come from Myanmar. The red stones from there
are prized for their purity and hue. Thailand buys the majority of
Myanmar's gems. The "Valley of Rubies", the mountainous Mogok area,
200 km (125 miles) north of Mandalay, is noted for its rare pigeon's
blood rubies and blue sapphires. Working conditions in the mines,
however, are said to be horrendous. Debbie Stothard of the Alternative
ASEAN Network on Burma stated that mining operators used drugs on
employees to improve productivity, with needles shared, raising the
risk of HIV infection: "These rubies are red with the blood of young
people." Brian Leber (jeweler who founded The Jewellers' Burma Relief
Project) stated that "for the time being," Burmese gems should not be
something to be proud of. (from wikipedia)

http://www.ruby-sapphire.com/pigeons-blood-mogok.htm is friendlier.

/usr/bin/mogok! /usr/bin/mogok!

On Dec 3, 2007 5:11 PM, thefed <fedzor@gmail.com> wrote:
>
> On Dec 3, 2007, at 8:00 PM, Giles Bowkett wrote:
>
> > I definitely and vigorously vote against rash and in favor of rush.
>
> In honor of how Rails and Rolls are both named after drugs, I think
> the shell should be named after some hard drug.
>
> Like maybe 'Rocks', which is slang for crack cocaine.
>
> -Ari
>
>

0
12/4/2007 1:52:20 AM
Mogok is totally depressing. You must face down evil, but never focus
on it. First rule of whoever that spiritual guy was with the rules
that one time. That's even worse than rash.

Rush sounds exciting and fun, and has decades of drum solos to back up
its reputation. Wow! What a rush!

Besides, I only advocate rush because the project is already named
rush, and was named rush by the people who are programming it. I think
actually the voting process, if there even is one, will heavily bias
the votes of people who contribute code to the project.

On 12/3/07, Christopher Anderson <significants@gmail.com> wrote:
> rash: terrible
> rush: terrible
>
> mogok! it sounds cool, it's related to rubies, erm, and apparently has
> a violent and oppressive history...
>
> hey it would also be humanitarian in how it brings to light an issue
> that people might not have thought about?
>
> 90% of the world's rubies come from Myanmar. The red stones from there
> are prized for their purity and hue. Thailand buys the majority of
> Myanmar's gems. The "Valley of Rubies", the mountainous Mogok area,
> 200 km (125 miles) north of Mandalay, is noted for its rare pigeon's
> blood rubies and blue sapphires. Working conditions in the mines,
> however, are said to be horrendous. Debbie Stothard of the Alternative
> ASEAN Network on Burma stated that mining operators used drugs on
> employees to improve productivity, with needles shared, raising the
> risk of HIV infection: "These rubies are red with the blood of young
> people." Brian Leber (jeweler who founded The Jewellers' Burma Relief
> Project) stated that "for the time being," Burmese gems should not be
> something to be proud of. (from wikipedia)
>
> http://www.ruby-sapphire.com/pigeons-blood-mogok.htm is friendlier.
>
> /usr/bin/mogok! /usr/bin/mogok!
>
> On Dec 3, 2007 5:11 PM, thefed <fedzor@gmail.com> wrote:
> >
> > On Dec 3, 2007, at 8:00 PM, Giles Bowkett wrote:
> >
> > > I definitely and vigorously vote against rash and in favor of rush.
> >
> > In honor of how Rails and Rolls are both named after drugs, I think
> > the shell should be named after some hard drug.
> >
> > Like maybe 'Rocks', which is slang for crack cocaine.
> >
> > -Ari
> >
> >
>
>


-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/4/2007 6:46:24 AM
On 12/4/07, Giles Bowkett <gilesb@gmail.com> wrote:
> Rush sounds exciting and fun, and has decades of drum solos to back up
> its reputation. Wow! What a rush!

i'd be more excited if the shell can run on windows, too. Unix shells
are already very powerful. One can throw just about any language to
it. A windows shell is wanting, and would be a killer app for windows.
The command shell in windows is terrible; heck, i cannot even do a
ctrl-pgup - grr!@#$

kind regards -botp

0
botpena (164)
12/4/2007 8:48:21 AM
On Dec 4, 2007, at 1:46 AM, Giles Bowkett wrote:

> Mogok is totally depressing. You must face down evil, but never focus
> on it. First rule of whoever that spiritual guy was with the rules
> that one time. That's even worse than rash.
>
> Rush sounds exciting and fun, and has decades of drum solos to back up
> its reputation. Wow! What a rush!
>
> Besides, I only advocate rush because the project is already named
> rush, and was named rush by the people who are programming it. I think
> actually the voting process, if there even is one, will heavily bias
> the votes of people who contribute code to the project.

You are all forgetting about three things:
First, the code. We need code to go along with this!
Second, the rubyunix mailing list. This thread belongs THERE!
Third, Mr Bowket please update your blog with something Rubyish.


Thanks,
Ari

0
fedzor (156)
12/4/2007 12:38:09 PM
On Dec 4, 2007, at 3:48 AM, botp wrote:

> On 12/4/07, Giles Bowkett <gilesb@gmail.com> wrote:
>> Rush sounds exciting and fun, and has decades of drum solos to  
>> back up
>> its reputation. Wow! What a rush!
>
> i'd be more excited if the shell can run on windows, too. Unix shells
> are already very powerful. One can throw just about any language to
> it. A windows shell is wanting, and would be a killer app for windows.
> The command shell in windows is terrible; heck, i cannot even do a
> ctrl-pgup - grr!@#$


You're in luck - since it's Ruby based, this kind of thing would  
actually work.

Check out the mailing list

- Ari

0
fedzor (156)
12/4/2007 12:39:14 PM
On Dec 4, 2:48 am, botp <botp...@gmail.com> wrote:
> On 12/4/07, Giles Bowkett <gil...@gmail.com> wrote:
>
> > Rush sounds exciting and fun, and has decades of drum solos to back up
> > its reputation. Wow! What a rush!
>
> i'd be more excited if the shell can run on windows, too. Unix shells
> are already very powerful. One can throw just about any language to
> it. A windows shell is wanting, and would be a killer app for windows.
> The command shell in windows is terrible; heck, i cannot even do a
> ctrl-pgup - grr!@#$
>
> kind regards -botp

OT: cygwin comes with sh or bash or some form of posix shell as I
recall, I think I also saw a native version of bash (but this was
several years ago). BTW, did you mean shift-pgup (scroll up) or is my
shell missing something?

Regards,
Jordan
0
MonkeeSage (654)
12/4/2007 12:55:17 PM
> One can throw just about any language to it.

I think that is a bit too short-sighted in the long run.
I don't know how you feel about it, but to me ruby evolves
around 100x faster than i.e. bash. And this includes new
ideas too. ;-)

Most scripts used on a *nix system will be shell scripts, i.e.
bootup scripts for example, and IMHO ruby beats shell scripts
with ease in pretty every regard (if you are able to use ruby
on your system that is).
Making a shell more a ruby-shell, also making it a practical
shell is a big advantage: You no longer have to care about
bash being the first-class citizen on your system, and then
throwing second class languages at it, you simply have your
many .rb files (many classes, many objects on your system)
and connect them together with that ruby-shell environment
being the first class citizen.
I think this is a nicer approach, and it's just a matter
of time until that all comes together in a practical
manner :)
rubyunix.rubyforge.org is a first nice step, let's see.

However, that being said (and since ruby+irb work on windows
as well), I agree with your remark about Windows.

(As a sidenote, the original, ancient rush was in part inspired
about the old monad shell on Windows presentation, which
showcased filtering on a dataset, and finally piping it into
some excel application which depicted a nice little graph. )


> The command shell in windows is terrible; heck, i cannot even do a
> ctrl-pgup - grr!@#$

Yeah it is ... some tools that can be usable on windows are
Mingw/MSys, Readline for windows, and Rlwrap. And of course ruby's
irb is not that bad either :-) in general Windows can be
quite usable once you use loads of open sourced stuff on
it and stand away from the other cr** IMHO ;-)
What did Larry say about perl? Use it's strength, not it's
weakness. I guess for windows the same accounts... avoid
its many pitfalls! ;-)
-- 
Posted via http://www.ruby-forum.com/.

0
shevegen (524)
12/4/2007 1:38:41 PM
On Dec 4, 2007, at 7:38 AM, Marc Heiler wrote:

> Most scripts used on a *nix system will be shell scripts, i.e.
> bootup scripts for example, and IMHO ruby beats shell scripts
> with ease in pretty every regard (if you are able to use ruby
> on your system that is).

They have totally different focuses.  I can see saying that Ruby is  
superior to bash as a general programming, but I would far prefer  
bash if I'm piping a bunch of utilities together, redirecting  
streams, and the like.

James Edward Gray II

0
james8284 (4405)
12/4/2007 1:56:45 PM
On Dec 2, 7:05 pm, Marc Heiler <sheve...@linuxmail.org> wrote:
> > Some day, some day, somebody smarter and more ambitious than me will
> > build that Ruby-native shell with all the joy of Ruby and command
> > line tools integrated...

> Second, I still have no real way on how to do piping of
> objects/data with a ruby shell. (After all we are talking of a
> real shell, no? One like in bash where you can apply filters...)

I started to create these tools some years ago, see:

 http://creo.hu/~csaba/ruby/pope/

Pope stands for "Powerful Piping Environment", a ruby implementation
of
the simple Unix IPC constructs (mainly pipes), and atop of it Urb,
an Irb hack which can be used as a shell (it has job control)
and features some syntax sugar to make this easy:

- basic Urb listener can do pipes like

    _("ls").|("grep '\.rb$'")_

  or if you need to be more exact (ie., you don't wanna rely on
  shellish command line parsing), you can do it like:

    _(["lame", "--decode", "Star Spangled Banner.mp3"]).|("oggenc -
ssb.ogg")._

  Irb completion is enhanced to make such lines easy to type.

- there is an other listener called Pidginsh, which can started with
"pidginsh"
  (and be left with ^D). It partially groks Bourne shell syntax and
dynamically
  translates shell commands to standard Urb calls. So in pidginsh

    ls | grep '\.rb$'

  will work and is equivalent with the above cited Urb command.

Alas, I didn't have the energy to finish this project and make it
really shine.
Even so, it's usable in its current form, I use it all the time
(however, you
probably won't end up like this, due to the lack of documentation :
(( ).

This code is available via Mercurial from http://mercurial.creo.hu/repos/pope/
or as a direct tarball download: http://mercurial.creo.hu/repos/pope/?archive/tip.tar.gz

Csaba
0
12/5/2007 1:52:42 AM
Once again, since people are really getting into this, I ENOURAGE YOU  
ALL TO JOIN THE RUBYUNIX MAILING LIST.


Thanks,
Ari

0
fedzor (156)
12/5/2007 2:05:00 AM
> Third, Mr Bowket please update your blog with something Rubyish.

I thought the Snoop Dogg video made for a nice change of pace.

-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/5/2007 5:18:26 AM
> Once again, since people are really getting into this, I ENOURAGE YOU
> ALL TO JOIN THE RUBYUNIX MAILING LIST.

You know, this is an interesting discussion, it's too bad there isn't
a mailing list we could take this to which is totally focused on this
topic and this project. Oh well. I guess I'll make myself a hamburger.

-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/5/2007 5:19:56 AM
On Dec 5, 2007, at 12:19 AM, Giles Bowkett wrote:

>> Once again, since people are really getting into this, I ENOURAGE YOU
>> ALL TO JOIN THE RUBYUNIX MAILING LIST.
>
> You know, this is an interesting discussion, it's too bad there isn't
> a mailing list we could take this to which is totally focused on this
> topic and this project. Oh well. I guess I'll make myself a hamburger.

I will wait until your blog has comments and I will troll them  
forever if you don't join.

http://preeventualist.org/lost

Please.

-ari

0
fedzor (156)
12/5/2007 12:35:56 PM
> >> Once again, since people are really getting into this, I ENOURAGE YOU
> >> ALL TO JOIN THE RUBYUNIX MAILING LIST.
> >
> > You know, this is an interesting discussion, it's too bad there isn't
> > a mailing list we could take this to which is totally focused on this
> > topic and this project. Oh well. I guess I'll make myself a hamburger.
>
> I will wait until your blog has comments and I will troll them
> forever if you don't join.

Well, I joined, but my blog is comment-free forever and ever. Blog
comments and Twitter both. Too much of a good thing.

-- 
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

0
gilesb (687)
12/5/2007 3:41:02 PM
John Joyce wrote:
> On Dec 1, 2007, at 6:45 PM, Giles Bowkett wrote:
> 
>> to get system (or backticks, which do almost exactly the same thing)
>> Blog: http://gilesbowkett.blogspot.com
>> Portfolio: http://www.gilesgoatboy.org
>> Tumblelog: http://giles.tumblr.com
>>
> Some day, some day, somebody smarter and more ambitious than me will
> build that Ruby-native shell with all the joy of Ruby and command
> line tools integrated...

Not terribly smart and definitely not ambitious here, but this thread is
a strange happenstance since I just dusted off the rs repository. This 
is
probably a good place to take a peek:

http://repos.kittensoft.org/rs/doc/HOWTO.using
http://repos.kittensoft.org

I have not had the time to work on rs in a long, long while but the
codebase looks OK still and the functionality is fairly nice. The
idea was to first gradually implement as powerful as possible shell
in pure Ruby syntax and then possibly later offer a parser on top of
it (so that one could e.g. use /tmp/foo rather than '/tmp/foo'.)

The current syntax was left as unobtrusive by default as possible.
FileSystemObjects, for example, cannot be implicitly created from
Strings (this is left for the user to do, just set up a #method_missing
handler) but overall it is pretty flexible. The above link has
some examples but the one I have often used:

  (ls | tr('a-z A-Z')).each {|f| p f.reverse}

Anyway.

Perhaps more news in the near future!

-- 
Posted via http://www.ruby-forum.com/.

0
12/6/2007 6:10:20 AM
Reply: