hstr
hstr copied to clipboard
hh trims suggestion at 1024 characters
Steps to reproduce
- Execute this
echo "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
- which is
1107
characters long
- Then look up latest "echo" and make sure it is pasted in command line (press RIGHT)
Output is trimmed at 1024.
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?
Enhancement: introduce parameter allowing to disable overflow protection for incomming commands.