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
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...