title: What is Bash source code that handles user input?
body: <p>I'm trying to write my own shell and I'm having a lot of problems implementing a noncanonical user input system. I've done countless Google searches, stack overflow searches, etc. and I've never found a solution that works quite like Bash's input system. I've used &quot;tcsetattr&quot; and &quot;ncurses&quot; and both methods had their issues. Instead of asking yet another question about how to make it work, I wanted to look at Bash's input code. However, I haven't been able to find the code that handles the keys that make noncanonical mode useful -- tab, up arrow, etc. Can anyone point me to the Bash code that handles input? I found &quot;input.c&quot; but that didn't look like what I referenced above.</p>
  <p>Thanks in advance.</p>