<br><br><div class="gmail_quote">On Tue, Oct 18, 2011 at 17:17, Aaron Meurer <span dir="ltr"><<a href="mailto:asmeurer@gmail.com">asmeurer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Oct 18, 2011 at 6:01 PM, Aaron Meurer <<a href="mailto:asmeurer@gmail.com">asmeurer@gmail.com</a>> wrote:<br>
> On Tue, Oct 18, 2011 at 5:48 PM, Fernando Perez <<a href="mailto:fperez.net@gmail.com">fperez.net@gmail.com</a>> wrote:<br>
>> Hi Aaron,<br>
>><br>
>> On Tue, Oct 18, 2011 at 4:14 PM, Aaron Meurer <<a href="mailto:asmeurer@gmail.com">asmeurer@gmail.com</a>> wrote:<br>
>>><br>
>>> Is there a way to make Control-D exit IPython even when the line is<br>
>>> not clear? This works for other control sequences, like Control-L, but<br>
>>> for Control-D, I have to first type Control-U, Control-K to clear the<br>
>>> line. I am on Mac OS X Lion and my config file is<br>
>>> <a href="https://github.com/asmeurer/dotfiles/blob/master/.ipython/profile_default/ipython_config.py" target="_blank">https://github.com/asmeurer/dotfiles/blob/master/.ipython/profile_default/ipython_config.py</a><br>
>>> if that matters.<br>
>><br>
>> I don't think so, b/c C-D is ambiguous: if there's text to the right<br>
>> it means delete character. My guess is that readline disables its EOF<br>
>> behavior as a safety precaution if it detects the line already has<br>
>> text on it.<br>
><br>
> Ah, I never knew about delete character. So I guess I really only<br>
> want it to do it when it's at the end of the line. I'll see if I can<br>
> do it with readline.<br>
><br>
> Aaron Meurer<br>
<br>
</div>All I found was the binding vi-eof-maybe, which I couldn't find any<br>
documentation on, but if I set control-D to do it, it acts like enter<br>
if text is on the line and like control D otherwise. It's hard to<br>
tell if this is what it's supposed to do or if IPython is just not<br>
recognizing the EOF with other text.<br></blockquote><div><br></div><div>If you are just configuring readline, a way to check is if bash is behaving the same as IPython. I think they should both load the same readline config from .inputrc.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
Aaron Meurer<br>
<br>
><br>
>><br>
>> But that feature is really in readline, you might want to poke around<br>
>> the readline docs to see if it's configurable: we simply trap the EOF<br>
>> exception and exit on it, we don't directly handle the key action.<br>
>><br>
>> Cheers,<br>
>><br>
>> f<br>
>><br>
><br>
_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
</div></div></blockquote></div><br>