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

Re: vi editting troubles



On Mon, May 21, 2001 at 01:28:05PM -0700, Bart Schaefer wrote:
> > Neither `r' or `fc -e -' work, and give me this error.
> > fc: can't open temp file: bad address
> 
> What's the value of $TMPPREFIX ?  This error means either that zsh is
> really not able to open a file, or that it opened the file [with open(2)]
> but then failed to create a FILE* object for it [fdopen(3)].

TMPPREFIX=/tmp/zsh -- I don't think I've ever touched it.

> Does a command such as `echo =(echo foo)' work?  That should use the same
> temp file mechanism as fc.

% echo =(echo foo)
Segmentation fault (core dumped)
(dbx) where
  [1] strlen(0x0, 0x201388, 0x74c200000, 0x7efefeff, 0x81010100, 0x6), at 0xffffffff7ed4027c
=>[2] ztrdup(s = 2102152 ""), line 52 in "string.c"
  [3] getoutputfile(cmd = 4297069232 "\x8b\x88echo foo"), line 2816 in "exec.c"
  [4] prefork(list = 4297069160, flags = 1), line 64 in "subst.c"
  [5] execcmd(state = 18446744071562065736, input = 0, output = 0, how = 18, last1 = 2), line 1742 in "exec.c"
  [6] execpline2(state = 18446744071562065736, pcode = 259U, how = 18, input = 0, output = 0, last1 = 0), line 1189 in "exec.c"
  [7] execpline(state = 18446744071562065736, slcode = 4098U, how = 18, last1 = 0), line 982 in "exec.c"
  [8] execlist(state = 18446744071562065736, dont_change_job = 0, exiting = 0), line 826 in "exec.c"
  [9] execode(p = 4297069056, dont_change_job = 0, exiting = 0), line 729 in "exec.c"
  [10] loop(toplevel = 1, justonce = 0), line 160 in "init.c"
  [11] zsh_main(argc = 1, argv = 18446744071562066680), line 1209 in "init.c"
  [12] main(argc = 1, argv = 18446744071562066680), line 37 in "main.c"

> > Secondly, searching through my history fails as well.  This one's a
> > bit hard to describe, but it seems to be picking a work from the last
> > command without even waiting for me to input something to search for.
> 
> Anyway, the workaround is to initialize the completion system (compinit)
> in your startup files before you set up vi key bindings (bindkey -v).

Thanks Bart, you're right, that does work for me.

-- 
Paul Ackersviller



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