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

Re: sticky-note and zle bindings



On Jan 16,  2:10pm, Andy Spiegl wrote:
}
} But how can I bind "sticky-note -l" etc. to a key?

Wrapper widget.  Here's a function for one that might be useful, cribbed
from the top part of sticky-note:

#autoload
if [[ "$CONTEXT" = (cont|select|vared) ]]
then
    zle -M "No $WIDGET during ${${(z)PREBUFFER}[1]:-$CONTEXT}, sorry"
    zle .beep
else
    zle .push-line
    BUFFER="sticky-note -l"
    zle .accept-line
fi



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