Replies: 1 comment 3 replies
-
When I added the ability to hide groups, what I intended that to be used for is "value-less" suffix commands, not arguments. I also did not intend for the "value" to be used in predicates. Maybe supporting these things would make sense, but implementing that could turn out to be difficult. Please provide a real-live example where this would be useful. I consider this a feature request and have thus converted it to a "discussion". |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue #157 mentions predicate refreshing. I've finally gotten around to testing
:refresh-suffixes t
. It's a great feature, thanks for implementing.A couple of small issues I noticed with it:
Values go missing
When hiding a given block, like
[:if-not some-predicate...
, any existing values, including those passed in via prefix slot:value
, go missing when those options are "hidden". I.e. when a hidden block becomes visible (e.g. because some other options are toggled), the values are no longer there, even if they were set in:value
or specified by the user during the same active prefix.Expectation
Hidden infix value should be retained, since they may soon be unhidden.
Predicates are evaluated too early to have reliable access to other infix values
I notice that the
:if
predicate is usually evaluated too early, prior to the prefix being set, so it cannot reliably respond to the initial value of other arguments. Any additional command (even arrow key, etc.) then refreshes. This is likely related more to internal access to the current prefix state than predicate refresh. Perhaps a single refresh after the prefix is fully setup would help here.Expectation
The initial state of the prefix reflects all current values.
Example
Here's an example that shows both of these issue. Set the
--loo
value to an even or odd number to hide the other column.I'm not sure if this is the current best way to pull the "state of the other infix arguments" in an
:if
/etc. predicate. I recognize this is using an internal variable, but it's what I've needed to use in the past to get "in flight access" to other state in an active prefix:Beta Was this translation helpful? Give feedback.
All reactions