zsh-users
 help / color / mirror / code / Atom feed
* vi editting troubles
@ 2001-05-21 19:13 Paul Ackersviller
  2001-05-21 20:28 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Ackersviller @ 2001-05-21 19:13 UTC (permalink / raw)
  To: zsh-users

Here are a couple of problems I've been having in the recent zsh's for
weeks, if not months.  Sorry for not reporting earlier, but here they are.

Neither `r' or `fc -e -' work, and give me this error.
fc: can't open temp file: bad address

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.
The binding looks normal:
"^[/" _history-complete-older
Another strange thing I notice when I turn on shell tracing is that my
TRAPZERR function runs in the middle of _history_complete_word -- is
there something I should be doing to avoid this?
+_history_complete_word:12> zstyle -s :completion::history-words stop stop
+TRAPZERR:0> eval echo "exit code 1"

-- 
Paul Ackersviller


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vi editting troubles
  2001-05-21 19:13 vi editting troubles Paul Ackersviller
@ 2001-05-21 20:28 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2001-05-21 20:28 UTC (permalink / raw)
  To: Paul Ackersviller, zsh-users

(Please direct further follow-ups to zsh-workers, everyone.  I didn't yet
because the compinit/bindkey -v info below is relevant to zsh-users, but
I suspect from here out it's going to be a debugging discussion.)

On May 21, 12:13pm, Paul Ackersviller wrote:
> Subject: vi editting troubles
> 
> 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)].

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

> 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.

That's because of the _history_complete_word widget.  This has been
reported before; hey, zsh-workers, somebody remind me what the good
reason was for introducing a new binding that begins with escape?

Anyway, the workaround is to initialize the completion system (compinit)
in your startup files before you set up vi key bindings (bindkey -v).

> The binding looks normal:
> "^[/" _history-complete-older

No, that's not normal (not for vi insert mode, anyway).  Normally there
would be no bindings for keys with ^[ (escape) as the prefix, because ^[
is supposed to take you from insert to command mode.

> Another strange thing I notice when I turn on shell tracing is that my
> TRAPZERR function runs in the middle of _history_complete_word -- is
> there something I should be doing to avoid this?

Hrm.  It would appear that everywhere where we are currently doing

	setopt ${_comp_options[@]}

we also need

	setopt localtraps noerrexit ; trap - ZERR

This is beginning to get messy.  Maybe this stuff should go into the C
code somehow?


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-21 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-21 19:13 vi editting troubles Paul Ackersviller
2001-05-21 20:28 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).