I can't type @ in the console



I can't type caracter @ in the rails console with my azerty keyboard, neither can I copy and paste the caracter in the console.
What should I do?


Have you tried right-clicking to paste?
You could generate it on the linux machine instead (as opposed to sending the character to it)
One way is to edit the current command in an editor
You could write the following:


And then enter the following keys (one key per line)


The last key should make @ show up

(the EDITOR variable says what command to use as the default editor, then ^x^e edits the current line in an external editor (which you specified in EDITOR). Then follows a bunch of keystrokes that makes vim create an @ and save and exit. Upon exiting, the command is executed, and then you can press UP key to go back to that command and edit it as you normally would)

Another method would be to upload a text file (for example pastebin.com) and then download that file, overwrite the bash history file, reload history from file, and then press UP:

history -r

(make sure to use a link to the raw text, not to a html page that shows the text)

.. for good measure here's a third:

printf '\x40\n' >> ~/.bash_history
history -r

(40 is 64 written in hex, and 64 is the ascii value for @. >> appends to file, in this case the history file. Then reload it and hit the UP key.)

If ~ is a problem as well then you can replace it with $HOME



Thank you for your answer! Unfortunately when I right-click I'm not
proposed to paste anything, and the ways you gave me do not work.

For the 1st one, the command line says "command not found".

For the 3rd one, I can't write the '\' in the console. Like the @, it
doesn't work.

For the 2nd way, I don't know how to do it, could you give me some details?



Ctrl is a button on your keyboard, hold it down while pressing x, keep ctrl down, press e, now release ctrl

If you want more details on something you'll have to describe what in particular you're missing because there's no way I can guess


Ok but EDITOR=vim works in the command line but not in the rails console...


Oh. Right.. That's harder. I have one idea, it's terrible and probably won't work. Gonna try it.
What about temporarily changing browser/keyboard layout? On-screen keyboard? Alt-keys? Hold alt and enter 64

edit: i give up on the terrible idea. it was bad.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.