From: Claus Spitzer Date: 2004-05-07T23:00:47+09:00 Subject: Re: any ideas for a shell based on Ruby? This is going into fantasyland, but perhaps you could use the way Ruby handles object chains to replace pipes... e.g. instead of doing $ ps -e | grep foo you could do $ ps( -e ).grep( foo ) Yeah I know, it's a crappy example, but it gives you the idea. Of course the problem would be on how to get the shell to treat binaries as objects. On the other hand, it might be interesting to integrate a class browser into the shell, like the Smalltalk system browser (again, bad analogy, but it gets the point through). On Fri, 7 May 2004 21:53:59 +0900, Martinus wrote: > > hello newsgroup, > > Recently I have played with the idea of writing a shell based on ruby. > I think this would be pretty cool, consider the following syntax: > > user@machine ~> ls.sort(:time).last.rm > > removes the oldest file in current directory: > 1. ls returns a special array of Filename objects > 2. The array is sorted by the attribute :date > 3. the last element is chosen from the array > 4. the file removes itself > > I am looking for other good ideas that justify creating such a ruby > based shell :-) > > Martin > >