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

Re: Off-by-one with select-*-shell-word text object?

On Sep 19, 12:01pm, Oliver Kiddle wrote:
} You've got to force set_bindk to either 1 or 0 and my guess is that
} a future widget is more likely to want 1 than to want 0. Even with
} a new bitmask flag, I'd sooner opt for it having the opposite sense
} to what you suggest.
} Daniel Shahaf wrote:
} > That's why I suggested to invent a new bitmask flag that implies
} > set_bindk on a per-widget basis: the property 'requires $WIDGET to
} > be self-referential' does not follow from 'is implemented in C'.

My somewhat related point is that UNLESS we're going to add an option
to "zle -N"/"zle -C" to control that new bitmask flag for user-defined
widgets, the unusual and therefore flag-worthy case applies only with
respect to builtins, and therefore is "requires $WIDGET to be caller-

} [aside: if anyone relied on it for run-help/which-command to invoke
} their own command, they should use zle -A].

This might be worth documenting.  It might have to be paired with
"zle .run-help" or similar?

} getvirange() is more concerned with the keys that were used than
} with the identify of the widget. That's why I'd sooner regard it
} as bindk that is overloaded.

Indeed, "bindkey -a z vi-change" makes "cc" "cz" and "zc" synonymous.

} I don't think adding another variable like $WIDGET is a good idea.

It'd need to be a $LASTKEYS to go with $LASTWIDGET, if anything.

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