Command Line will not allow me to type ~

  • paste it in
  • navigate to $HOME and edit .bash_profile
  • add it programmatically to your history and then press UP

$ printf "\176\n" >> $HOME/.bash_history

#4 do you do that? I tried typing it?


Tried it... i probably did something wrong it didn't work


you can see it here

My keyboard does not allow me to type a character used in a Codecademy lesson. What should I do?


I'm confused. In the command line do I type Alt + 126, or do I press the alt button on my mac and type 126???


Probably takes less time to try both than to type out the message you just posted?


do I press the alt button on my mac and type 126?

yes do that .


well, I did that and I got:
trying it again differently:
I'm probably doing it wrong, or it's a mac.


maybe it's diff on mac .. Becasue it work on windows


Stupid macs... screwing up my coding


I forgot that you need to reload history afterwards.

$ printf "\176\n" >> $HOME/.bash_history
$ history -r   # read history file


Did this:

$ printf "\176\n" >> $HOME/.bash_history
$ history -r

in the command line
Err.. So embarrassed, not working.


you can try the option 5 in this link Option 5


the command line will not allow me to copy paste into the editor, or else I would have


I tried this:
Not the character i needed


and the Mac OSX option


I actually have that, and i can type the things anywhere ~~~ using the character/keyboard viewer, but the second I go into the command line thing it does not allow me to.


did you try another browser(s)


Assuming that the history is working, just add the characters to the history file. If that's "not working" then investigate which part didn't go through and find another way to do the same thing. For example, if you're unable to print >> as well, then you could use tee, or you could upload a file with the characters and download it and rename to .bash_history .. and so on, bash is a programming language and there are lots of other utilities at your disposal, you have many options
If you just say "not working" then you haven't done a whole lot of thinking about what's preventing the desired effect and makes it that much harder to get around that problem.


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