Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 12
    That's not insert mode that's XOFF. You can disable software flow control by doing stty -ixon (add it to your ~/.bashrc). Then that keystroke will be available to be bound to something else. By default in Bash it's bound to forward-search-history (the opposite of Ctrl-r). Ctrl-q (Bash quoted-insert) will also be available. Commented Jul 2, 2012 at 14:18
  • @DennisWilliamson Wouldn't .bash_profile be a better place? There's no need to turn it off in non-interactive shell, is it? Commented Mar 4, 2014 at 22:14
  • 1
    @PiotrDobrogost: "When an interactive shell that is not a login shell is started, Bash reads and executes commands from ~/.bashrc, if that file exists." .bash_profile is only executed when Bash is a login shell. "So, typically, your ~/.bash_profile contains the line if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" Commented Mar 4, 2014 at 22:22
  • @DennisWilliamson You are right. What I meant to say is that there's probably sense to disable software flow control only in interactive shells. If this is true then subsequently it would make sense to find a way to tell if a shell is interactive and disable software flow control only in this case. Commented Mar 5, 2014 at 20:01
  • @PiotrDobrogost: See my answer to "How can I check in bash if a shell is running in interactive mode?" Commented Mar 5, 2014 at 20:19