Jump to content

Maximum character limit on {query} text passed to workflows


theSquashSH

Recommended Posts

This is a limit imposed by UNIX, not Alfred, but the error message shown is slightly confusing, and there should be a way to overcome this issue.

 

Right now, selecting more than exactly 260527 characters on my system and using it in an Alfred workflow (with the Argument:'selection in OS X' setting) as "{query}" will throw an error.

You can see your system's bash argument character limit with:

getconf ARG_MAX

Alfred should allow a way to pass the selection as stdin instead of a quoted and escaped string, otherwise there is no way around this hard limit, and Line-Counting workflows, etc. are useless for larger bodies of text.

 

qTaar4d.png
^ Confusing error message when selecting too much text.

 

mFlbFph.png
^ A workflow example that would trigger this.

 

g1p9ii8.png

echo "{query}" > .wordcount
echo "Characters: "$(wc -m < .wordcount)"  Words: "$(wc -w < .wordcount)"  Lines: "$(wc -l < .wordcount)
rm .wordcount
Edited by nikisweeting
Link to comment
  • 2 weeks later...
×
×
  • Create New...