[Q] In place edit mode activation?

Discussion in 'Ruby' started by Laurent Julliard, Jul 9, 2008.

  1. Hello,

    Does anybody knows if there is a way to activate the 'in place edit
    mode' from within a Ruby script that would have the same effect as using
    the -i option on the command line?

    Thanks

    Laurent
     
    Laurent Julliard, Jul 9, 2008
    #1
    1. Advertising

  2. Laurent Julliard wrote:
    > Hello,
    >
    > Does anybody knows if there is a way to activate the 'in place edit
    > mode' from within a Ruby script that would have the same effect as using
    > the -i option on the command line?


    Use $-i="" :

    [~/tmp] cat >foo
    foo
    [~/tmp] cat dash-i.rb
    $-i=""
    [~/tmp] ruby -r dash-i -p -e '$_.upcase!' foo
    [~/tmp] cat foo
    FOO

    HTH

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Jul 10, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marine
    Replies:
    3
    Views:
    23,638
    Marine
    Feb 15, 2006
  2. dba56
    Replies:
    0
    Views:
    593
    dba56
    Jul 7, 2006
  3. Frank Kurka
    Replies:
    8
    Views:
    310
  4. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    398
    Jaime Stuardo
    Apr 7, 2006
  5. jobs at webdos
    Replies:
    0
    Views:
    473
    jobs at webdos
    Oct 9, 2006
Loading...

Share This Page