From 5b4c66d3ef1b6e6448d3e944a1395c6f0843fe13 Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Sun, 19 Feb 2023 15:01:33 +0100 Subject: [PATCH] Update arguments_in_coreutils.md --- design/arguments_in_coreutils.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/design/arguments_in_coreutils.md b/design/arguments_in_coreutils.md index a34f445..dbc0aaa 100644 --- a/design/arguments_in_coreutils.md +++ b/design/arguments_in_coreutils.md @@ -115,6 +115,6 @@ These all behave slightly differently. 1. `head` and `tail` only accept this if it is the first argument and exactly 2 arguments are given. 2. In `fold` the `-N` must be standalone (e.g. `-10b` is rejected), but can appear at any position. 3. In `kill`, the same rules as `fold` apply, but it can also be a name instead of a number. -4. In `uniq`, the syntax does not need to stand alone and is additive in a weird way, because they hack `-22` as `-2 -2` so each flag `-1...-9` multiplies the previous by 10 and adds itself. I'm not sure that we need to support this. Doing something like what `fold` and `kill` do is probably fine. -5. `pr` the behaviour is similar to `uniq` +4. In `uniq`, the syntax does not need to stand alone and is additive in a weird way, because they hack `-22` as `-2 -2` so each flag `-1...-9` multiplies the previous by 10 and adds itself. I'm not sure that we need to support this. Doing something like what `fold` and `kill` do is probably fine. Also note that to make it extra confusing, the `+` variant works like `fold`. +5. `pr` the behaviour is similar to `uniq`. 6. `split` seems to be somewhere between `uniq` and `fold`. It accepts things like `-x10x` correctly, but it doesn't do the additive thing from `uniq` across multiple occurrences. Basically, it's very clever and cursed.