Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toolbar menu to easily toggle between options #26

Closed
donnemartin opened this issue Dec 7, 2015 · 3 comments
Closed

Add toolbar menu to easily toggle between options #26

donnemartin opened this issue Dec 7, 2015 · 3 comments

Comments

@donnemartin
Copy link
Collaborator

Toolbar Options

  • F2 toggles fuzzy completions
  • F3 toggles Vi and Emacs key bindings
  • F4 toggles single and multiple columns in the autocompletion menu
  • F5 toggles the help pane
  • F10 exits aws-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 (#5). For example:

 aws> ec2 describe-inst

Fuzzy On

Imgur

Fuzzy Off

Imgur

Vi/Emacs Key Bindings

Currently aws-shell runs with Vibindings, which might not suit everyone. For SAWS and aws-shell personally I'm starting to use the Emacs 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.

Imgur

Imgur

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 the meta info differently single vs multi. For single you see more meta right away, for multi, you only see meta for the currently highlighted completion. I've also applied pygments styles to the menu and meta, although the multi meta style doesn't seem to be taking hold.

Single Column

Imgur

Multi Column

Imgur

Single Column Meta

Imgur

Multi Column Meta

Imgur

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

Imgur

Menu Off

Imgur

Exit

To exit, Ctrl-D might not be obvious to some users.

Imgur

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.

@donnemartin donnemartin changed the title Add toolbar menu Add toolbar menu to easily toggle between options Dec 7, 2015
@jamesls
Copy link
Member

jamesls commented Dec 8, 2015

I think these are great additions. The UI looks great.

I plan on fixing the fuzzy search algorithm, those improvements are being tracked here: #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.

@donnemartin
Copy link
Collaborator Author

I'm getting close to wrapping up these changes and submitting a PR.

Branch:
https://github.com/awslabs/aws-shell/commits/feature/26-toolbar.

@jamesls
Copy link
Member

jamesls commented Dec 17, 2015

I believe this can be closed now, merged in 654c93a

@jamesls jamesls closed this as completed Dec 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants