Closed donnemartin closed 8 years ago
I think these are great additions. The UI looks great.
I plan on fixing the fuzzy search algorithm, those improvements are being tracked here: https://github.com/awslabs/aws-shell/issues/5 I do hope that eventually a prefix match will always be offered first, even with the fuzzy searching on. I think this is doable but I understand needing to have a toggle.
I'm getting close to wrapping up these changes and submitting a PR.
Branch: https://github.com/awslabs/aws-shell/commits/feature/26-toolbar.
I believe this can be closed now, merged in https://github.com/awslabs/aws-shell/commit/654c93a3aa38c9344624f94922a4c1a928f201d7
Toolbar Options
F2
toggles fuzzy completionsF3
togglesVi
andEmacs
key bindingsF4
toggles single and multiple columns in the autocompletion menuF5
toggles the help paneF10
exitsaws-shell
Fuzzy Toggle
Some users might want to turn off fuzzy matching. I sometimes toggle this depending on what I'm doing.
On a related note, I think the current fuzzy matching works pretty well, although in some cases it actually results in more keystrokes (https://github.com/awslabs/aws-shell/issues/5). For example:
Fuzzy On
Fuzzy Off
Vi/Emacs Key Bindings
Currently
aws-shell
runs withVi
bindings, which might not suit everyone. ForSAWS
andaws-shell
personally I'm starting to use theEmacs
mode more it feels more natural to me thinking of these apps as a command line tool rather than an editor.TODO: With
Vi
bindings we might want to add info to let the user know what mode is active.Single vs Multi Column Completion Menus
Some users might prefer the current multi column and others might prefer the single column. I prefer the latter it seems 'less busy' and more like what I'm accustomed to with other apps, although it could take some scrolling unlike the multi column option where you see pretty much everything.
prompt-toolkit
also handles themeta
info differently single vs multi. For single you see moremeta
right away, for multi, you only seemeta
for the currently highlighted completion. I've also appliedpygments
styles to the menu andmeta
, although the multimeta
style doesn't seem to be taking hold.Single Column
Multi Column
Single Column Meta
Multi Column Meta
Help Toggle
The help pane is really cool, although it does take up a lot of space. Users might not always want to see this menu--for example they might only want to see this for unfamiliar commands. Users might want to reclaim that screen real estate.
Menu On
Menu Off
Exit
To exit,
Ctrl-D
might not be obvious to some users.TODO
These options should probably go to a config file to save their state between sessions.
We could also make the toolbar content configurable if the number of options starts growing large.