18

This question already has an answer here:

My bash does not know the letter p. zsh does though.

When I type a p in bash, it simply ignores it, and even pasting in text that contains a p will result in no p in the pasted text. This behavior is the same across terminals (I tried, urxvt, st and tty)

I tried commenting out everything in my ~/.profile, ~/.bash_profile and ~/.bashrc, the problem still persists. Using root though, everything is fine. My /root/.profile, /root/.bash_profile and /root/.bashrc are symlinked to the files in my home directory. So the problem can't originate there, but it's got to be something that is different for root and my user.

I use a custom keyboard layout, but when I switch to standard US keyboard layout, the problem still persists as well.

Just to rule this out as well: I do not use gnome.

Where else can I look?

marked as duplicate by Gilles bash Jun 8 at 9:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Is there any .inputrc in effect? – choroba Jun 7 at 9:07
  • 1
    ha, yes, that's it! I had this left in there: # fix not working delete-key, see https://git.suckless.org/st/file/FAQ.html # line 51 # printf '\033[?1h\033=' >/dev/tty I'm using urxvt again anyways, so it doesn't matter – maddingl Jun 7 at 9:12
  • That was easier than I thought :) If you make your comment an answer, I can accept it – maddingl Jun 7 at 9:14
  • Been there, done that :) – choroba Jun 7 at 9:16
  • 3
    @maddingl could you copy that content into the answer. This would be a very good one for future readers! I understand this was something you might have done yourself but it's good for people to understand cause -> effect. – Philip Couling Jun 7 at 9:17
19

Besides the files you mentioned, there could be .inputrc in effect that changes the interpretation of the p key.

Edit: maddingl (the OP) confirms:

That's it. I had left the following in there:

# fix not working delete-key in st, see https://git.suckless.org/st/file/FAQ.html
# line 51
printf '\033[?1h\033=' >/dev/tty

That line does fix the delete-key in st, but it also causes the described problem. I went back to urxvt anyways, so for me it does not matter. If the reader is using st and wants both working p and delete, see the above mentioned link for more info.

  • 4
    @maddingl I don't think your edit was warrented. First of all: don't write edits using first-person. Edits should fix errors or add small amounts of information. IMHO instead of editing this answer you could have added your own answer instead. – Giacomo Alzetta Jun 7 at 10:54
  • 4
    @GiacomoAlzetta: Let's not treat new users with conflicting demands. maddingl was asked to do it this this commend on the question above. – user000001 Jun 7 at 19:07
  • I think the comment was suggesting that @maddlingl write his own answer, but it was written unclearly. – Barmar Jun 7 at 22:08
  • @Barmar Yes, that's what I meant. If a user edits someone else's answer/question they should do so in an "integrated manner", not like "Hey, different user here. This is what I did ...". At that point they should simply write their own answer and add a reference to the other answer. – Giacomo Alzetta Jun 10 at 7:05
  • @GiacomoAlzetta please don't encourage people to write new posts inappropriately. Answers are for new answers not further clarification of existing answers. – Philip Couling Jun 10 at 9:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.