PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Is there an equivalent in irb to command: history in bash?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Is there an equivalent in irb to command: history in bash?

Réponse
 
LinkBack Outils de la discussion
Vieux 19/11/2007, 06h44   #1
Stephen Bannasch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Is there an equivalent in irb to command: history in bash?

Is there an equivalent in irb to the command history in bash?

After I've been doing a bunch of work in the shell I often use the
history command in bash to get a list of all the commands I've
executed which I copy and past into an editor to document the work I
did.

Is there an equivalent command for irb which would list by lines each
command I have entered? Rightnow I use readline to scan backwards
and copy and paste individually.

Thanks for any suggestions.

  Réponse avec citation
Vieux 19/11/2007, 07h20   #2
Chris Shea
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

On Nov 18, 10:44 pm, Stephen Bannasch <stephen.banna...@deanbrook.org>
wrote:
> Is there an equivalent in irb to the command history in bash?
>
> After I've been doing a bunch of work in the shell I often use the
> history command in bash to get a list of all the commands I've
> executed which I copy and past into an editor to document the work I
> did.
>
> Is there an equivalent command for irb which would list by lines each
> command I have entered? Rightnow I use readline to scan backwards
> and copy and paste individually.
>
> Thanks for any suggestions.


I think this irb_history business from Ben Bleything is what you want:
http://blog.bleything.net/pages/irb_history

HTH,
Chris
  Réponse avec citation
Vieux 19/11/2007, 08h27   #3
Ben Bleything
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

On Mon, Nov 19, 2007, Chris Shea wrote:
> I think this irb_history business from Ben Bleything is what you want:
> http://blog.bleything.net/pages/irb_history


I think so too

Ben

  Réponse avec citation
Vieux 19/11/2007, 15h38   #4
Stephen Bannasch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

>On Mon, Nov 19, 2007, Chris Shea wrote:
>> I think this irb_history business from Ben Bleything is what you want:
>> http://blog.bleything.net/pages/irb_history

>
>I think so too
>


Thanks ... perfect ;-)

  Réponse avec citation
Vieux 19/11/2007, 21h59   #5
sishen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

Hi, Ben. really great work,

One more feature request: Why not auto save the history in .irb_history,
just like what the history of bash does?

sishen

On Nov 19, 2007 3:27 PM, Ben Bleything <ben@bleything.net> wrote:

> On Mon, Nov 19, 2007, Chris Shea wrote:
> > I think this irb_history business from Ben Bleything is what you want:
> > http://blog.bleything.net/pages/irb_history

>
> I think so too
>
> Ben
>
>


  Réponse avec citation
Vieux 19/11/2007, 22h07   #6
Ben Bleything
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

On Tue, Nov 20, 2007, sishen wrote:
> Hi, Ben. really great work,


Thanks!

> One more feature request: Why not auto save the history in .irb_history,
> just like what the history of bash does?


So that's something that should probably be documented better. The code
that I wrote relies on pre-existing history enabler code. It is meant
as a supplement to something like Michael Granger's persistent IRB
history:

http://www.rubygarden.org/Ruby/page/.../TipsAndTricks

or Wirble (gem install wirble), which just packages the above with some
other IRB hacks. If you set up Michael's code or install wirble and
enable history, it'll save your history between sessions.

My code does not replace that stuff; it serves a different purpose.
Mine is about accessing the history you already have. I've been meaning
to re-open a conversation I was having with wirble's author over a year
ago, to get my code included there. Once that happens (if Paul is still
interested), you'll be able to just install/enable wirble and have all
your history goodies for free.

Hope that answers your question

Ben

  Réponse avec citation
Vieux 20/11/2007, 00h02   #7
Tomas Pospisek's Mailing Lists
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

On Mon, 19 Nov 2007, Ben Bleything wrote:

> On Mon, Nov 19, 2007, Chris Shea wrote:
>> I think this irb_history business from Ben Bleything is what you want:
>> http://blog.bleything.net/pages/irb_history

>
> I think so too
>
> Ben


Ben, don't you want to add a link from the blog entry to where people can
get the chunk of code that will perform the magic?
*t

--
-----------------------------------------------------------
Tomas Pospisek
http://sourcepole.com - Linux & Open Source Solutions
-----------------------------------------------------------

  Réponse avec citation
Vieux 20/11/2007, 00h39   #8
Ben Bleything
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

On Tue, Nov 20, 2007, Tomas Pospisek's Mailing Lists wrote:
> >On Mon, Nov 19, 2007, Chris Shea wrote:
> >>I think this irb_history business from Ben Bleything is what you want:
> >>http://blog.bleything.net/pages/irb_history

>
> Ben, don't you want to add a link from the blog entry to where people can
> get the chunk of code that will perform the magic?


The link from the thread takes you to the actual code, and both blog
posts (linked below) link to it as well. Maybe it's not obvious enough?
Or are you talking about a different page?

http://blog.bleything.net/2006/10/21...istory-for-irb
http://blog.bleything.net/2007/7/30/...-fixed-edition

Ben

  Réponse avec citation
Vieux 20/11/2007, 07h56   #9
sishen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

Cool~,

On Nov 20, 2007 5:07 AM, Ben Bleything <ben@bleything.net> wrote:

> On Tue, Nov 20, 2007, sishen wrote:
> > Hi, Ben. really great work,

>
> Thanks!
>
> > One more feature request: Why not auto save the history in .irb_history,
> > just like what the history of bash does?

>
> So that's something that should probably be documented better. The code
> that I wrote relies on pre-existing history enabler code. It is meant
> as a supplement to something like Michael Granger's persistent IRB
> history:
>
> http://www.rubygarden.org/Ruby/page/.../TipsAndTricks
>
> or Wirble (gem install wirble), which just packages the above with some
> other IRB hacks. If you set up Michael's code or install wirble and
> enable history, it'll save your history between sessions.
>
> My code does not replace that stuff; it serves a different purpose.
> Mine is about accessing the history you already have. I've been meaning
> to re-open a conversation I was having with wirble's author over a year
> ago, to get my code included there. Once that happens (if Paul is still
> interested), you'll be able to just install/enable wirble and have all
> your history goodies for free.
>
> Hope that answers your question
>
> Ben
>
>


  Réponse avec citation
Vieux 20/11/2007, 09h33   #10
Tomas Pospisek's Mailing Lists
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

On Tue, 20 Nov 2007, Ben Bleything wrote:

> On Tue, Nov 20, 2007, Tomas Pospisek's Mailing Lists wrote:
>>> On Mon, Nov 19, 2007, Chris Shea wrote:
>>>> I think this irb_history business from Ben Bleything is what you want:
>>>> http://blog.bleything.net/pages/irb_history

>>
>> Ben, don't you want to add a link from the blog entry to where people can
>> get the chunk of code that will perform the magic?

>
> The link from the thread takes you to the actual code, and both blog
> posts (linked below) link to it as well. Maybe it's not obvious enough?
> Or are you talking about a different page?
>
> http://blog.bleything.net/2006/10/21...istory-for-irb
> http://blog.bleything.net/2007/7/30/...-fixed-edition


Oh, I was coming from the "RubyConf stuff" blog entry which AFAICS doesn't
have a pointer to the code. I didn't verify the other blog entries links
:-o
*t

--
-----------------------------------------------------------
Tomas Pospisek
http://sourcepole.com - Linux & Open Source Solutions
-----------------------------------------------------------

  Réponse avec citation
Vieux 21/11/2007, 20h57   #11
Ben Bleything
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is there an equivalent in irb to command: history in bash?

On Tue, Nov 20, 2007, Tomas Pospisek's Mailing Lists wrote:
> Oh, I was coming from the "RubyConf stuff" blog entry which AFAICS doesn't
> have a pointer to the code. I didn't verify the other blog entries links
> :-o


Woops! You're right, and I should fix that. And now I have. Thanks

Ben

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 20h38.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,19353 seconds with 19 queries