Re: 'set -e' and 'trap 0' togheter does not work as expected on syntax errors

2009-08-22 Thread Stefano Lattarini
At Saturday 22 August 2009, Chet Ramey wrote: > Stefano Lattarini wrote: >> I have the following scripts: >> >> [CUT] >> >> I thought that when bash detect a syntax errors in the script, >> it would pass a $? != 0 to the code in the exit trap, regardless >> of whether `set -e' is active or not. >

Re: Inconsistent output in terminal emulator

2009-08-22 Thread Bob Proulx
nico raffo wrote: > I'm writing a simple terminal emulator (on linux using standard pty > libraries) and have run across some behavior in bash that I cannot > explain after several weeks of reading documentation. I am not sure of the exact cause of your trouble. But having been a few days and no

Re: bash won't let me bind \C-w

2009-08-22 Thread Dieter Holkenpolk
Thank you for the magic fix: set bind-tty-special-chars Off

bug or undocumented feature

2009-08-22 Thread Mitch Frazier
Someone just pointed out to me at the link below that you can close open files in bash using "n>&-", for example: exec 7&- # Close fd 7 The close appears to be a special case of (from the man page): > Similarly, the redirection operator > > [n]>&digit- > > moves the file descrip

Re: bug or undocumented feature

2009-08-22 Thread Jan Schampera
Mitch Frazier wrote: > The close appears to be a special case of (from the man page): > >> Similarly, the redirection operator >> >> [n]>&digit- >> >> moves the file descriptor digit to file descriptor n, >> or the standard output (file descriptor 1) if n is not >> specified. > > Not sure

Re: Inconsistent output in terminal emulator

2009-08-22 Thread Chet Ramey
Bob Proulx wrote: > nico raffo wrote: >> I'm writing a simple terminal emulator (on linux using standard pty >> libraries) and have run across some behavior in bash that I cannot >> explain after several weeks of reading documentation. > > I am not sure of the exact cause of your trouble. But hav