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

Re: PATCH: exit after 10 EOF's



Hi Guys,

My own feelings are that this...

However, because no one ever intended for 10 consecutive EOF _characters_ to be treated as a real EOF -- rather, they intended 10 consecutive zero- byte reads to be treated as _not_ an EOF character, and nobody ever typed 10 EOF characters on purpose -- zsh does _not_ have to play dumb and exit
on 10 EOF characters.

... while it may have been historically true, isn't any more. I quite often have to use a shared account where the shell is set to tcsh, and ignoreeof is turned on. It annoys me greatly, but as it is a shared account I have limited power to change things. I have held down control-D on purpose and watched a whole stream of warnings scroll up the screen rather than give in and type "exit" or "logout" - tcsh eventually gets the message and exits.

This is why I feel that Peter's patch isn't a bad thing. As for default vs configured behaviour wrt widgets and such, I'd agree that if you've set ignoreeof and you've got a special binding on <whatever EOF is set to>, then you probably want to be able to hit it 10 times in a row without the shell exiting.

But in the absence of any special binding I don't see what's wrong with giving in and exiting after <some number> of the standard ignoreeof warnings have been printed.

I believe that tcsh (30 warnings?), bash (10) and ksh (10) all do this, and they all have the same ability to detect an EOF character separately from an EOF condition.

Cheers,


Duncan.




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