Irb Pleca ("pipe") teclado

Buenas noches,
Usualmente uso el comando Alt+179 ó el Alt+124 para añadir la barra
verical (pleca, “pipe”, │ ) en cualquier lado. Pero en la terminal, bajo
irb este tipo de combinaciones no las puedo realizar.
Buscando en internet he visto que bajo Windows XP la creación de un
archivo .inputrc en el directorio C:\Documents and Settings<usuario>
con las siguientes líneas …
“\M-[”: “[”
“\M-]”: “]”
“\M-{”: “{”
“\M-}”: “}”
“\M-\”: “\”
“\M-|”: “|”
“\M-@”: “@”
“\M-~”: “~”
“\M-$”: “$”
… y la adición de …
@echo off
set HOME=%HOMEPATH%
… al archivo irb.bat, parecen funcionar, pero en mi Windows 7 x64 no
lo logro.
Utilizando el “Microsoft Keyboard Layout Creator” añadí │ a una de las
teclas, pero al utilizarla en IRB me muestra la barra partida.
Esto último también sucede si copio y pego │ en la terminal.
Agradecería si alguien me puede guiar en la manera de solucionar este
problema, pues sin esa teclita no puedo avanzar.
Mil gracias,
Diego

I just realized that most of the posts are in English…

In order to insert a “pipe” in my Windows x64 machine I usually use
Alt+179 or Alt+124 commands.
This works fine everywhere but on IRB command prompt.
I did some research on internet and found a solution that seems to work
on Windows XP machines, but I couldn’t make it work on my Windows 7 x64.
Also, when I try to copy/paste the pipe ("|") what I get is the (“¦”)
symbol, which is not good for Ruby.
As you know the “pipe” is really important for Ruby programming, so I’m
stocked at this point.
I’m running out of ideas about how I should handle this.
I’ll really appreciate any help or guidance you can provide me.
Regards,
Diego

On Aug 31, 2011, at 9:36 PM, Diego P. wrote:

stocked at this point.
I’m running out of ideas about how I should handle this.
I’ll really appreciate any help or guidance you can provide me.
Regards,
Diego

Can you use the Windows Character Map to insert the pipe character? I
don’t have access to a Windows 7 machine at home to test this.

You can get to the character map like this: clicking the Start button ,
clicking All Programs, clicking Accessories, clicking System Tools, and
then clicking Character Map.

–Mark

Thank you Mark for your response.
I tried copy/paste from the Character Map to the terminal, but as I
said, what is pasted is the (“¦”) symbol instead of ("|") symbol.
Therefore, I’m not even being able to locate my “HOME” path on windows 7
and consequently I’m unable to make the aforementioned lines to work.
Thanks again,
Diego

To explain myself a little bit more…
When I create the .inputrc file and add the lines to the file irb.bat,
what I get is this:
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

C:\Users\Me>irb
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:2095:in expand_path': non-absolute home (ArgumentError) from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:2095:in_rl_read_init_file’
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:2078:in
rl_read_init_file' from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:2499:inreadline_initialize_everything’
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:3730:in
rl_initialize' from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:4737:inreadline’
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/readline.rb:40:in
readline' from C:/Ruby192/lib/ruby/1.9.1/irb/input-method.rb:115:ingets’
from C:/Ruby192/lib/ruby/1.9.1/irb.rb:139:in block (2 levels) in eval_input' from C:/Ruby192/lib/ruby/1.9.1/irb.rb:273:insignal_status’
from C:/Ruby192/lib/ruby/1.9.1/irb.rb:138:in block in eval_input' from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:188:incall’
from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:188:in
buf_input' from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:103:ingetc’
from C:/Ruby192/lib/ruby/1.9.1/irb/slex.rb:205:in match_io' from C:/Ruby192/lib/ruby/1.9.1/irb/slex.rb:75:inmatch’
from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:286:in token' from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:262:inlex’
from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:233:in block (2 levels)in each_top_level_statement' from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:229:inloop’
from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in block in each_top_level_statement' from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:228:incatch’
from C:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in
each_top_level_statement' from C:/Ruby192/lib/ruby/1.9.1/irb.rb:155:ineval_input’
from C:/Ruby192/lib/ruby/1.9.1/irb.rb:70:in block in start' from C:/Ruby192/lib/ruby/1.9.1/irb.rb:69:incatch’
from C:/Ruby192/lib/ruby/1.9.1/irb.rb:69:in start' from C:/Ruby192/bin/irb:12:in


I replaced %HOME% with the actual path, and I don’t get the
ArgumentError anymore, but still it did not accept alt-gr generated
characters…

Diego

Thank you Michal.
Maybe you’re right.
I tried a simple command and it works as you can see below.
How silly of me!
Regards,
Diego

C:\Users\User>irb
irb(main):001:0> 1.upto(9) {|x| print x }
123456789=> 1
irb(main):002:0>

On 1 September 2011 06:09, Diego P. [email protected] wrote:


I replaced %HOME% with the actual path, and I don’t get the
ArgumentError anymore, but still it did not accept alt-gr generated
characters…

| usually is displayed with a hole in the middle, depending on the font.

The difference you are seeing may be just the terminal using different
font than the system font used for menus and buttons.

HTH

Michal