hstr icon indicating copy to clipboard operation
hstr copied to clipboard

hh trims suggestion at 1024 characters

Open zdmytriv opened this issue 5 years ago • 2 comments

Steps to reproduce

  1. Execute this
echo "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
  • which is 1107 characters long
  1. Then look up latest "echo" and make sure it is pasted in command line (press RIGHT)

Output is trimmed at 1024.

zdmytriv avatar Oct 16 '18 15:10 zdmytriv

It's intentional as I wanted to protect HSTR from (un)intentional input which is too long. I estimated reasonable command size limit and made it 1k.

@zdmytriv Actually I'm curious what's real world use case for such a long command - can you please share an example?

I can easily extend the limit... what size would you suggested?

dvorka avatar Dec 02 '18 17:12 dvorka

Enhancement: introduce parameter allowing to disable overflow protection for incomming commands.

dvorka avatar Dec 07 '19 21:12 dvorka