shoe: print tab options less eagerly

Turns out that having these pop up on every tab-press is really annoying,
and you usually only want them when it didn't manage to autocomplete anything.
This commit is contained in:
Fang 2020-06-14 23:36:03 +02:00 committed by GitHub
parent a6f09727ef
commit d4b4fe67f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,7 +267,6 @@
[%det clear]
==
::
::NOTE cargo-culted
++ tab
|= pos=@ud
^- (quip card _cli-state)
@ -287,7 +286,9 @@
%+ add pos
(met 3 (fall forward ''))
=| cards=(list card)
=? cards ?=(^ options)
:: only render the option list if we couldn't complete anything
::
=? cards &(?=(~ to-send) ?=(^ options))
[(effect %tab options) cards]
|- ^- (quip card _cli-state)
?~ to-send