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

Re: bindkey to INS



On Sep 24, 12:32am, Konstantin Sobolev wrote:
}
} Is it possible to bind an INS key to accept-and-menu-complete?
} All my attempts like
} bindkey -M menuselect "${key[Insert]}" accept-and-menu-complete
} doesn't work, pressing Insert just prints a "~".

This appears to be a bug with menu-selection, not with bindkey.  I
can't make any key binding of more than 3 characters work with the
menuselect keymap.  I've tried as far back as zsh-4.0.6, so it is
not something new with UTF-8 support or the like.

} Also, is it possible to bind a couple of commands to the same key, like
} bindkey "^Z" "kill-line; accept-line"?

You need to create a widget.

    function accept-leftward {
	zle kill-line
	zle accept-line
    }
    zle -N accept-leftward
    bindkey \^Z accept-leftward



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