Feature #195
closedIgnore empty input
0%
Description
Alfred does not allow to abort execution in a scripting context.
For example, this will announce an empty string nevertheless:
echo -n "" | alfred -s 99
There seem to be no way to avoid this without more scripting.
Ignoring an empty input would solve this.
Files
Updated by M W about 10 years ago
I my scenario I have a script that might or might not generate output
based on some settings.
The cronjob executes this line:
s="$(myscript.sh)"; [ -n "$n" ] && {echo "$n" | alfred -s 99;}
I rather would like to write:
myscript.sh | alfred -s 99
Updated by Sven Eckelmann about 10 years ago
I am against this misfeature because I have already deployments were we need to be able to "delete" the current content by overwriting it using empty strings. This empty string must be forwarded to allow everyone to detect that the old content is not valid anymore and the local cached content has to be dropped.
Btw. these are deployments which are used by Marek. And accepting this patch would make Marek most likely very unhappy.
Updated by Marek Lindner over 9 years ago
Yeah, I am a happy person and wish to remain happy in the near future!
Can we find a compromise making everybody happy ? Like adding a commandline switch to alfred which - if set - ignores empty strings ? Or we add a flag specifically designed to delete currently existing content ?
Updated by Sven Eckelmann over 9 years ago
Yes, it would be technical possible to add a flag to the client code like --no-empty. This option would force the client code (not the server!!!!) to drop strings when they are empty.
Updated by M W over 9 years ago
I have changed my use of batctl so far. It is fine to close this ticket.
Updated by Marek Lindner over 9 years ago
- Status changed from New to Closed
Ok, thanks for the info.
Updated by Sven Eckelmann almost 8 years ago
- Status changed from Closed to Rejected