This way, people don't have to do double negatives in their head.
---
grep.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/grep.c b/grep.c
index 64ffbe2..ae23967 100644
--- a/grep.c
+++ b/grep.c
@@ -114,23 +114,23 @@ grep(FILE *fp, const char *str)
Previously, it printed lines that didn't match some pattern. Instead,
it should print lines that don't match *any* pattern.
Test case:
out=$(echo foo | ./grep -v -e foo -e bar)
if [ "$?" = 1 ] && [ -z "$out" ] ; then
echo pass
else
echo fail
fi
---
grep.c | 28 +++
Test case:
if printf '%s\n' foo bar | ./grep -F foo >/dev/null ; then
echo pass
else
echo fail
fi
---
grep.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/grep.c b/grep.c
index ae23967..fb911ff 100644
--- a/grep.c
+++ b/grep.c
@@ -107,7 +107,7 @@ grep
the main complication is not to learn how to use a piece of software,
but to find or create the right one to use.
On 5/13/16, Rubén Llorente wrote:
> Ben Woolley wrote:
>> The word "properly" presumes a purpose/end/effect. Billions of people use
>> computers for their own purposes. If you are go
you're making up words there. nobody cares about your aesthetic problem
if your code only adds complexity to people's lifes you shouldn't
code. my code makes other people's lifes easier.
finding the right abstractions is a process.
this does not apply only to code btw.
On 5/13/16, Ben Woolley