|
From: | Andreas Grünbacher |
Subject: | Re: [Quilt-dev] [PATCH] files: Return nothing if there are no files |
Date: | Tue, 11 Feb 2014 15:12:08 +0100 |
2014-02-11 Jean Delvare <address@hidden>: > "quilt files" returns a blank line if no files are included in the > patch. This could easily break constructs such as "quilt files | wc > -l" or "if [ -z "$(quilt files)" ]". Let "quilt files" return nothing > at all if there are no files in the patch. [ -z "$(quilt files)" ] ignores leading/trailing whitespace so it doesn't actually care. How about getting rid of the echo? - echo $(files_in_patch "$patch") | + files_in_patch "$patch" | Andreas
[Prev in Thread] | Current Thread | [Next in Thread] |