nushell / reedline

A feature-rich line editor - powering Nushell
https://docs.rs/reedline/
MIT License
513 stars 138 forks source link

Brainstorming Features #63

Open fdncred opened 3 years ago

fdncred commented 3 years ago

1. Line Editor UI/UX Features

Brainstorming of ideas about what features would make a line editor and programs that use it best-in-class. I'm interested to see which of these people agree with. These aren't necessarily MVP type ideas and perhaps even greater than 1.0 ideas.

1.2. Prompt Features #64

1.3. Completions Features #65

1.4. History Features #66

1.5. Hinting Features #65

1.6. Syntax Highlighting Features #67

1.7. PopUps/PopUnders Features #68

1.8. Keybinding #69

1.9. Miscellaneous #70

sholderbach commented 3 years ago

How should we vote or state our priorities?

fdncred commented 3 years ago

Good question. Any suggestions? It would be nice to allow people to upvote certain things. Maybe there's some voting site that does that?

sophiajt commented 3 years ago

One way to do the voting would be to let people pick their top three things, then count that. Folks could reply here if we do it that way.

sholderbach commented 3 years ago

As the granularity/scope of the ideas/milestones varies we may want to break the main themes out into separate tracking issues under a milestone so that we can better keep track what is relevant in that area. We than can use the one here to weigh on the focus of the general themes. Using the emojis on github with individual comments would probably get quite messy.

fdncred commented 3 years ago

@sholderbach I was going to split this up into issues like you did (Thanks!!!) but what do you think about adding the github emojis to allow people to vote by clicking on them? I think we just need to maybe number them and say to vote for X use the +1/thumbs up emoji, to vote for Y use the -1/thumbs down emoji. I just see 8 emojis so maybe we can only have the top 8 things to vote on. What do you think?

BTW - i added to History - ability to remove history

sholderbach commented 3 years ago

My suggestion would be to put a list of the eight currently most important/controversial ideas in a comment below with the emojis as labels, so we can update the top comment as an overview as needed without screwing with the past votes.

Template below:

Current voting

Vote for the topic(s) you care about by selecting the corresponding emoji. (No judgement based on the emojis sentiment!)

# Current voting

Vote for the topic(s) you care about by selecting the corresponding emoji. (No judgement based on the emojis sentiment!)

- :+1: 
- :-1: 
- :smile: 
- :tada: 
- :confused: 
- :heart: 
- :rocket: 
- :eyes: 
sholderbach commented 3 years ago

Voting on the feature areas you want the project to focus on

Vote for the topic(s) you care about by selecting the corresponding emoji. (No judgement based on the emojis sentiment!)

fdncred commented 3 years ago

Thansk @sholderbach. Here's another feature that needs to go in some category.

sholderbach commented 3 years ago

I would like to add the category 'System interaction' including stuff like compatibility validation on ssh, tmux etc.

There it would fit in. Where is the responsibility boundary between line editor and integration with nushell?

fdncred commented 3 years ago

Speaking of validation, there may need to be some type of Validator trait like rustyline's.

fdncred commented 3 years ago

Since these are all referenced in their own issues, I think I'm going to close this one to declutter. We can re-open if needed.

fdncred commented 3 years ago

oops, didn't notice it was pinned. Reopening. :)

nixypanda commented 3 years ago

Idea: Prefix based history search.

Example use-case: (assuming you are using vi mode)

  1. Your start writing a command dock
  2. Hit escape and start going through history using k
  3. you will get suggestions like docker ls docker-compose ls docker-compose logs etc.

Note: adding this separately from 'history search based on a criteria' as one doesn't need to hit Cmd-r (or equivalent) for this.

fdncred commented 3 years ago

@sherubthakur This is what I meant by this item in the history list above. Maybe I should've named it Prefix based search

hustcer commented 2 years ago

In bash we can do :

nu \
  -c 'version'

to break lines, maybe we can add this feature too.

sholderbach commented 2 years ago

In bash we can do :

nu \
  -c 'version'

to break lines, maybe we can add this feature too.

This is beyond the scope of reedline as special casing characters in the buffer would constrain the grammar of the using language (nu might not want to adopt the backslash bashism as it is annoying with Windows paths). The Validator trait can be implemented to do checks whether an expression is complete. The submit on enter check could be extended on reedline's side to provide option to only submit on the last line/last char position.