zsh-workers
 help / color / mirror / code / Atom feed
* New compinstall and bindkey
@ 1999-06-28 14:44 Oliver Kiddle
  1999-06-29 11:26 ` Andrej Borsenkow
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Kiddle @ 1999-06-28 14:44 UTC (permalink / raw)
  To: zsh-workers

Firstly, the new compinstall doesn't seem to work very will when the
functions have been installed in subdirectories: It refuses to accepy
/usr/local/share/zsh/functions as the directory containing the
functions. I don't quite understand the reasoning behind making compinit
an autoloaded function which is unloaded. I'd prefer to have it in
/usr/local/share/zsh/functions and not in my fpath. Is it faster as a
function?

How do I bind a key to insert a new-line without doing an accept-line.
In the zed function it is done with bindkey "^M" self-insert-unmeta but
this binds it to return. I was hoping to bind it to Alt-Return.

Thanks

Oliver Kiddle


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

* RE: New compinstall and bindkey
  1999-06-28 14:44 New compinstall and bindkey Oliver Kiddle
@ 1999-06-29 11:26 ` Andrej Borsenkow
  1999-06-29 13:48   ` new menu selection and " Oliver Kiddle
  1999-06-29 16:03   ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: Andrej Borsenkow @ 1999-06-29 11:26 UTC (permalink / raw)
  To: Oliver Kiddle, zsh-workers

>
> Firstly, the new compinstall doesn't seem to work very will when the
> functions have been installed in subdirectories: It refuses to accepy
> /usr/local/share/zsh/functions as the directory containing the
> functions. I don't quite understand the reasoning behind making compinit
> an autoloaded function which is unloaded. I'd prefer to have it in
> /usr/local/share/zsh/functions and not in my fpath. Is it faster as a
> function?
>

The reason I  didn't like sourcing compinit was that I hate to have any
dependencies on local installation place. Making it autoloaded function makes it
invariant:

autoload compinit; compinit

As I finally pointed out, there are other ways. One possibility is to define
parameter (say, COMPINIT) that holds full pathname of compinit (if it was
installed). In this case you could use

[[ -n "$COMPINIT" ]] && source "$COMPINIT"

I don't actualy care which one is used.

> How do I bind a key to insert a new-line without doing an accept-line.
> In the zed function it is done with bindkey "^M" self-insert-unmeta but
> this binds it to return. I was hoping to bind it to Alt-Return.
>

Hmmm ... in command line editing multiline input I can insert new line by
pressing ^V^J.

/andrej


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

* new menu selection and Re: New compinstall and bindkey
  1999-06-29 11:26 ` Andrej Borsenkow
@ 1999-06-29 13:48   ` Oliver Kiddle
  1999-06-29 16:03   ` Bart Schaefer
  1 sibling, 0 replies; 4+ messages in thread
From: Oliver Kiddle @ 1999-06-29 13:48 UTC (permalink / raw)
  To: Andrej Borsenkow; +Cc: zsh-workers

I've now looked at the new selection for menu completion. Firstly,
thanks Sven: it's great. There is one thing I don't like. When I move
the cursors to highlight the string I want to complete to and press
return, the highlighting is removed but menu-completion continues so if
I press tab again, it cycles through the selections as opposed to
accepting my selection and going on to complete whatever is next.
 
I also have problems with an aixterm where the next item on the left is
highlighted in addition to the one on the right in some circumstances.

Andrej Borsenkow wrote:

> The reason I  didn't like sourcing compinit was that I hate to have any
> dependencies on local installation place. Making it autoloaded function makes it
> invariant:

That makes more sense now - thanks.

> Hmmm ... in command line editing multiline input I can insert new line by
> pressing ^V^J.

Thanks, bindkey -s "^[[100q" "^V^J" works very nicely.

Oliver Kiddle


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

* Re: New compinstall and bindkey
  1999-06-29 11:26 ` Andrej Borsenkow
  1999-06-29 13:48   ` new menu selection and " Oliver Kiddle
@ 1999-06-29 16:03   ` Bart Schaefer
  1 sibling, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1999-06-29 16:03 UTC (permalink / raw)
  To: zsh-workers

On Jun 29,  3:26pm, Andrej Borsenkow wrote:
} Subject: RE: New compinstall and bindkey
}
} > Firstly, the new compinstall doesn't seem to work very will when the
} > functions have been installed in subdirectories: It refuses to accepy
} > /usr/local/share/zsh/functions as the directory containing the
} > functions.

I was going to complain about this myself.  Not only that, but I somehow
managed to get it to set FPATH to a string consisting of a space-separated
list of the dirs in which the functions were installed.  (That made it as
easy as "vared fpath<RET><RET>" to get the path set correctly, but it sure
was confusing.)

} > How do I bind a key to insert a new-line without doing an accept-line.
} > In the zed function it is done with bindkey "^M" self-insert-unmeta but
} > this binds it to return. I was hoping to bind it to Alt-Return.
} >
} 
} Hmmm ... in command line editing multiline input I can insert new line by
} pressing ^V^J.

I can insert one with ESC-return, and though "bindkey -m" doesn't make that
equivalent to alt-return, "bindkey '\M-\C-M' self-insert-unmeta" does so.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

end of thread, other threads:[~1999-06-29 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-28 14:44 New compinstall and bindkey Oliver Kiddle
1999-06-29 11:26 ` Andrej Borsenkow
1999-06-29 13:48   ` new menu selection and " Oliver Kiddle
1999-06-29 16:03   ` 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).