Open balupton opened 8 months ago
So this was done during my trip to Bali in April, and I'm now fixing up the tests. Updates were posted to the discord server.
One issue is that I removed filter functionality in favour of a new --default-fuzzy=
option, however that causes echo-checksum --algorithm=sha
to fail currently as it does not support multiple defaults with the default --no-multi
behaviour.
As such, after some prototyping and discussion with @molleweide I'll go with the last option in this brainstorm below, which introduces the idea of preferences:
Which ones?
▣ a
▣ aa
> ▣ aaa
□ b
SELECT [SPACE] CONFIRM [ENTER] [E] CANCEL [ESC] [Q] UP [↑] [W] [K] DOWN [↓] [S] [J] FIRST [HOME] [A] LAST [END] [D] ALL/NONE [T]
4 ITEMS, 4 SELECTED, 3 PREFERENCES | NEXT [A] PRIOR [D] RESET [Z] NONE [T]
Which one?
> ◉ a
☉ aa
○ b
○ b
○ b
○ b
☉ aaa
○ b
SELECT [SPACE] [ENTER] [E] CANCEL [ESC] [Q] UP [↑] [W] [K] DOWN [↓] [S] [J] FIRST [HOME] [A] LAST [END] [D] SEARCH [/]
9 ITEMS, 1 SELECTED, 3 PREFERENCES, 5 CONCEALED | NEXT [A] PRIOR [D] RESET [Z] ALL/NONE [T]
/ SEARCHING FOR: > sha
Which one?
[ 5 items above ]
> ◉ a
☉ aa
○ b
○ b
○ b
○ b
☉ aaa
○ b
[ 1 item below ]
SELECT [SPACE] [ENTER] [E] CANCEL [ESC] [Q] UP [↑] [W] [K] DOWN [↓] [S] [J] FIRST [HOME] [A] LAST [END] [D] NEXT [A] PRIOR [D] RESET [Z]
Progress is going well. There's a lot of new functionality added and I believe it will be significantly more usable now. Nearly there.
Verified the new styling makes sense with @molleweide, who also gave a good suggestion that I'll experiment with: a complete legend toggle.
The remaining todos are:
All up, I think everyone is going to be really ecstatic with the new choose
command.
Made great progress on this with @molleweide, only trivial things remaining.
Preview of the upcoming styles for:
choose-path 'Which one?' 'Your selection is important' --confirm --multi --default-fuzzy=echo -- "$DOROTHY/commands/"*
The prior version of this:
choose-path --question=$'Which one?\nIt is important' --multi --confirm --filter=echo- -- "$DOROTHY/commands/"*
Doesn't actually support fuzzy default matching, and is so slow on my macbook pro 2017 model that it takes about a minute to load... with the confirm and filter functionality being an unintuitive mess...
edit: more improvements have been made since above screenshots
Remaining todos:
Current preview of latest functionality in this WIP:
https://github.com/bevry/dorothy/assets/61148/a0af26a2-1493-4000-8f26-16e542384fba
Today's changes also:
Remaining todos:
choose-menu returns indexes, choose-option supports filters. They should be the same command now, which would offer a better experience around timeouts and filters. The different functionality should just be via a choose --index option or so.