Console icon indicating copy to clipboard operation
Console copied to clipboard

Max length input / Max value to display

Open Esysteme opened this issue 10 years ago • 6 comments

It should be nice to add a max value of input :

  • Add the max to display to stay in cell (after have to move with curstor < >
  • Add a limit of length, to prevent overflow

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Esysteme avatar May 12 '14 11:05 Esysteme

(Previouly created at https://github.com/hoaproject/Registry/issues/3).

Hello :-),

Could you give us a use case for such a feature?

Hywan avatar May 12 '14 11:05 Hywan

/cc @jubianchi

Hywan avatar May 12 '14 11:05 Hywan

@jubianchi

the goal is to make CLI intervace as :

The goal is the text have to stay in input and don't break the windows.

In second time save the bottom and put it back after we try autocomplete. (nice to have)

Esysteme avatar May 12 '14 12:05 Esysteme

I think that this is not part of Hoa\Console\Readline to support an “input”. But having a max length does not sound bad. Do we print an error when the “end of the line” is reached?

Hywan avatar May 14 '14 07:05 Hywan

I think just better to block as html when max reached

Esysteme avatar May 14 '14 09:05 Esysteme

To implement correectly this feature, we need to detect if a character is printable or not. Consequently, this is related to https://github.com/hoaproject/Console/issues/16#issuecomment-43053055.

Hywan avatar Aug 08 '14 08:08 Hywan