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

Re: An example of writing a custom history file?



On Mon, Dec 15, 2014 at 1:22 PM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:

> On Mon, Dec 15, 2014 at 6:05 PM, Rocky Bernstein <rockyb@xxxxxxxxxxxxx>
> wrote:
> > Making the change suggested, adding 1000 doesn't change the behavior - no
> > file is written. Again, here is the entire 12-line program:
>
> Please don't top post.
>
> I was able to get your example to work as-is by adding -i to the
> hashbang line. None of the other suggestions in this thread made any
> difference.
>

Thanks - that worked. And as you report, none of the other suggestions did.

The following problem I can work around, but I mention because it is weird.

When I go back and add -i or --interactive to zshdb, the completion
menu comes in the line before rather than after, but what is more
troublesome is that the entered text after
the prompt isn't cleared.

So, for input:

    zshdb<1> set hi<tab>

instead of:

    highlight history
    zshdb<1> set highight

I get:

   zshdb<1> set hiset highlight
   highlight history

Some more info which may be relevant.

I tried to reproduce this in that little 12 line program by adding the
relevant code that I am using:

    completer() {
        ((2 == CURRENT)) && compadd -- fee fie foo
    }
    zle -C test_complete menu-expand-or-complete completer
    bindkey '^i' test_complete


That works fine.  It seems to have to do with the fact that in order to
make sure in zshdb that I have an interactive terminal I open a new one.
So I'm guessing that has something to do with the behavior above.


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