4 ms·
This is the first revision: https://github.com/coreutils/coreutils/blob/ccbd1d7dc5189f4637468a8136f672e60ee0e531/src/yes.c https://github.com/coreutils/coreuti
by exxo_ 9y ago
This is the first revision:
https://github.com/coreutils/coreutils/blob/ccbd1d7dc5189f4637468a8136f672e60ee0e531/src/yes.c https://github.com/coreutils/coreutils/blob/ccbd1d7dc5189f46...
- pulse7 9y ago(joke) They copied the API of the main() function... :-)
- h2hn 9y agoAnd here is the madness: :) https://github.com/coreutils/coreutils/commit/35217221c211f3116f374f305654462195aa634a https://github.com/coreutils/coreutils/commit/35217221c211f3...
- alkonaut 9y agoAnd the motivation: it's used as test inputs. Not sure I agree with completely destroying the readability of a perfectly readable file - but ok.
- acqq 9y agoThe motivation, as far as I see, was only that it "may be used." But see the post of belorn where he argues that the error handling seems to be good.
- Paul-ish 9y agoIs the date on that accurate, did that happen in 2016? Kinda hurts the theory that they were trying to avoid Unix similarity.
- jwilk 9y agoIt says: Mar 9, 2015
- simias 9y agoOne point in favor of this simple version is that it's immediately obvious that it doesn't do the same thing as the OpenBSD version. In OpenBSD `yes a b c` will only print "a" while in GNU it prints "a b c". I did not catch that when I was reading the more complicated modern version.