sam reckoner | 18 Sep 01:13

history formatting a la iPython

The iPython interpreter does something very clever with history that
zsh might like.

When starting a new iPython session, all history items  are labeled
starting from 1. However, history items prior to this are labeled with
a leading zero. This is useful, because my current zsh history starts
with 1013, so accessing prior commands from the current session means
typing in a 4 digit number whereas with ipython, I would need only
maybe 2 digits and could still get at earlier history elements via the
leading zero.

just an idea.

thanks.

Richard Hartmann | 19 Sep 02:18

Re: history formatting a la iPython

On Thu, Sep 18, 2008 at 01:17, sam reckoner <sam.reckoner <at> gmail.com> wrote:

> When starting a new iPython session, all history items  are labeled
> starting from 1. However, history items prior to this are labeled with
> a leading zero.

I am not sure I understand this scheme. Let's suppose I do

zsh
echo foo
echo bar
<CTRL-D>
zsh
echo quux
echo quuux

What numbers would the four commands above have?

Richard

sam reckoner | 19 Sep 03:05

Re: history formatting a la iPython

01 echo foo
02 echo bar
1 echo quux
2 echo quuux

I hope that helps.

On Thu, Sep 18, 2008 at 5:18 PM, Richard Hartmann
<richih.mailinglist <at> gmail.com> wrote:
> On Thu, Sep 18, 2008 at 01:17, sam reckoner <sam.reckoner <at> gmail.com> wrote:
>
>
>> When starting a new iPython session, all history items  are labeled
>> starting from 1. However, history items prior to this are labeled with
>> a leading zero.
>
> I am not sure I understand this scheme. Let's suppose I do
>
> zsh
> echo foo
> echo bar
> <CTRL-D>
> zsh
> echo quux
> echo quuux
>
> What numbers would the four commands above have?
>
>
> Richard
(Continue reading)


Gmane