Project

General

Profile

Actions

Feature #195

closed

Ignore empty input

Added by M W about 10 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/13/2014
Due date:
% Done:

0%

Estimated time:

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

ignore_empty_input.patch (416 Bytes) ignore_empty_input.patch M W, 09/13/2014 03:17 AM
Actions #1

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

Actions #2

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.

Actions #3

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 ?

Actions #4

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.

Actions #5

Updated by M W over 9 years ago

I have changed my use of batctl so far. It is fine to close this ticket.

Actions #6

Updated by Marek Lindner over 9 years ago

  • Status changed from New to Closed

Ok, thanks for the info.

Actions #7

Updated by Sven Eckelmann almost 8 years ago

  • Status changed from Closed to Rejected
Actions

Also available in: Atom PDF