Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Printing ^C, ^D key presses at end of prompt when pressed



On Feb 5,  3:54pm, Philippe Troin wrote:
} Subject: Re: Printing ^C, ^D key presses at end of prompt when pressed
}
} > Maybe there's yet another stty option getting involved here?  Even with
} > bash3 I don't see the ^C when I interrupt cat.
} 
} It could be.  These are my full stty settings:

Mine are identical except -
- my stty does not support "swtch" or "iutf8" (CentOS4)
- I have -hupcl -brkint -imaxbel, the reverse of yours.

However, changing any of those has no different effect.

} I assume you do NOT have ttyctl is frozen mode:
 
I do have it frozen, but that only affects what happens to the settings
after the shell gets control back from an external command.

}  1. Ctrl-C is pressed on the terminal
} 
}  2. Kernel tty layer sees it is the stty intr character, emits the ^C
}     string to the tty, and send SIGINT to the foreground process group
}     which would be zsh.
} 
}  3. Zsh catches SIGINT, then clears the line (that's where ^C would
}     disappear), and redisplays the prompt.

I don't think that can be it, because you can easily see that zsh does
not clear the line.  Type some characters, back up into the middle of
them, and then hit ^C; the stuff to the right of the cursor remains.

} (I was not aware of the STTY special environment variable).
} I think CentOS5's handling of tostop seems is broken or missing.

Do you mean tostop or ctlecho?

schaefer<511> stty tostop
schaefer<512> (echo foo) &
[1] 26738
[1]  + suspended (tty output)  ( echo foo; )



Messages sorted by: Reverse Date, Date, Thread, Author