in reply to STDIN Odd Bevahior in Linux Environments

Also, you may want to check your shell, or your environment. I know ksh often does this, and with bash I have never had this issue. You can try 'set -o vi' and maybe that will stop it from happening, or stty erase <then hit backspace> so it looks like stty erase ^H<enter>. Or do a chsh and change to bash.
  • Comment on Re: STDIN Odd Bevahior in Linux Environments

Replies are listed 'Best First'.
Re^2: STDIN Odd Bevahior in Linux Environments
by Damashii (Scribe) on Sep 24, 2009 at 12:56 UTC
    I would recommend treading carefully with the 'set -o vi' as it can be a real pain if you are not prepared for it. For example, if you are used to pressing the up arrow for your command history, set -o vi will take this away. You will have to use your vi keys for this (escape k and j for up and down). I prefer 'set -o emacs' to allow me to use the arrow keys for my history.
    As for the ^H, as others have suggested stty erase ^H should fix the problem in your current terminal. You should be able to set it in your .bashrc, so that it will be persistent across sessions.
      vi-mode in zsh 4 works very much like in a vi-like editor (after setting 4-5 custom key bindings for insert mode). In ksh93, bash 3 (& below), it is best to stick with emacs-mode as vi-mode support is horrrid with too many exceptions (wrt an editor). Situation may have changed in bash 4, but I doubt that.