zsh-workers
 help / color / mirror / code / Atom feed
* Setting magic-space in /etc/zshrc
@ 2016-05-25 10:12 Sebastian Gniazdowski
       [not found] ` <CAH+w=7Z1RTUK9Hft_cg3=-GTPo8+fxzKX_5CMcZQN1nGS3H-Cw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Gniazdowski @ 2016-05-25 10:12 UTC (permalink / raw)
  To: Zsh hackers list

Hello,
let's have in /etc/zshrc:

bindkey ' ' magic-space
bindkey ' '

When shell startups, it shows: " " magic-space. When I issue "bindkey
' '", it shows self-insert. That's the point. However space apparently
is really bound to magic-space, despite it shows " " self-insert. I
had a widget that was overriding self-insert and it wasn't called on
space untill I've added bindkey ' ' self-insert to startup block.

Tested on Fedora 23 / zsh-5.1.1. It has space bound to magic-space by
default. I've tried doing so (via /etc/zshrc, like on Fedora) on OS X
and the problem reproduces. However, funny part is: not if I start the
shell again via zsh-5.2 -i (the same way iTerm2 starts it).

Best regards,
Sebastian Gniazdowski


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

* Re: Setting magic-space in /etc/zshrc
       [not found]   ` <CAH+w=7Zkvxrgi5KB-1oMSHpfL+j8whbL4meV7Yn=x1wmDai2wQ@mail.gmail.com>
@ 2016-05-25 10:42     ` Bart Schaefer
  2016-05-25 11:22       ` Sebastian Gniazdowski
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2016-05-25 10:42 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

On May 25, 2016 10:12 PM, "Sebastian Gniazdowski" <sgniazdowski@gmail.com>
wrote:
>
> When shell startups, it shows: " " magic-space. When I issue "bindkey
> ' '", it shows self-insert.

I'm not able to reproduce this on OSX with 5.0.2 or a recent build of
5.2-dev-1 (the only OS/versions I have accessable at the moment).  If
happening, this may have something to do with the emacs / vicmd keymaps
selected automatically by examining the VISUAL / EDITOR environment
settings, such that you are seeing/binding one keymap in /etc/zshrc and
another later.

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

* Re: Setting magic-space in /etc/zshrc
  2016-05-25 10:42     ` Bart Schaefer
@ 2016-05-25 11:22       ` Sebastian Gniazdowski
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Gniazdowski @ 2016-05-25 11:22 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh hackers list

On 25 May 2016 at 12:42, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On May 25, 2016 10:12 PM, "Sebastian Gniazdowski" <sgniazdowski@gmail.com>
> wrote:
>>
>> When shell startups, it shows: " " magic-space. When I issue "bindkey
>> ' '", it shows self-insert.
>
> I'm not able to reproduce this on OSX with 5.0.2 or a recent build of
> 5.2-dev-1 (the only OS/versions I have accessable at the moment).  If
> happening, this may have something to do with the emacs / vicmd keymaps
> selected automatically by examining the VISUAL / EDITOR environment
> settings, such that you are seeing/binding one keymap in /etc/zshrc and
> another later.

You are apparently right. I have bindkey -v. Removing it on Fedora
causes bindkey ' ' to display magic-space also after complete startup.
In the widget, I was creating own keymap by copying it from emacs. So
it had the /etc/zshrc influence in it. However, I was also doing some
checks while debugging: added bindkey ' ' to overriding self-insert
widget – shown self-insert. Added magic-space override – and it wasn't
called on space.

Best regards,
Sebastian Gniazdowski


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

end of thread, other threads:[~2016-05-25 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-25 10:12 Setting magic-space in /etc/zshrc Sebastian Gniazdowski
     [not found] ` <CAH+w=7Z1RTUK9Hft_cg3=-GTPo8+fxzKX_5CMcZQN1nGS3H-Cw@mail.gmail.com>
     [not found]   ` <CAH+w=7Zkvxrgi5KB-1oMSHpfL+j8whbL4meV7Yn=x1wmDai2wQ@mail.gmail.com>
2016-05-25 10:42     ` Bart Schaefer
2016-05-25 11:22       ` Sebastian Gniazdowski

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