View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001942 | 1003.1(2024)/Issue8 | Shell and Utilities | public | 2025-08-31 22:16 | 2025-10-09 14:40 |
Reporter | dwheeler | Assigned To | ajosey | ||
Priority | normal | Severity | Objection | Type | Enhancement Request |
Status | Under Review | Resolution | Open | ||
Name | David A. Wheeler | ||||
Organization | |||||
User Reference | diff | ||||
Section | diff | ||||
Page Number | 1 | ||||
Line Number | 1 | ||||
Interp Status | |||||
Final Accepted Text | |||||
Summary | 0001942: Add common options to diff | ||||
Description | # Proposal: Add options to diff The current POSIX diff specification <https://pubs.opengroup.org/onlinepubs/9799919799/utilities/diff.html> lacks many options that are widely supported across major implementations. Adding them would make portable use of `diff` far more capable. I did a cross-comparison of GNU, MacOS, FreeBSD, and BusyBox to see what was widely implemented in diff with the same semantics. I think that widespread implementation is a good argument that they're useful and should be standardized. (If I made a mistake, my apologies, please correct me): | Option | GNU | macOS | FreeBSD | BusyBox | Notes | |--------|-----|-------|---------|---------|--------| | `-a` | YES | YES | YES | YES | Consistent | | `-B` | YES | YES | YES | YES | Consistent | | `-d` | YES | YES | YES | YES* | *BusyBox: Partial implementation | | `-i` | YES | YES | YES | YES* | *BusyBox: ASCII-only | | `-I` | YES | YES | YES | NO | Not in BusyBox | | `-N` | YES | YES | YES | YES | Consistent | | `-q` | YES | YES | YES | YES | Consistent | | `-s` | YES | YES | YES | YES | Consistent | | `-T` | YES | YES | YES | YES | Consistent | | `-w` | YES | YES | YES | YES | Consistent | | `-x` | YES | YES | YES | NO | Not in BusyBox | | `-X` | YES | YES | YES | NO | Not in BusyBox | Obviously there are other implementations, but I thought this would be a helpful starting point. While `-I`, `-x`, and `-X` aren't implemented in BusyBox, I think they'd be easy to add since it already has a regex engine. The `-i` (ignore case) pays attention to locale as usual for every implementation, *except* BusyBox. BusyBox is usually compiled for only the C locale, while it currently only uses ASCII comparison, in general they probably don't notice. I think it should be standardized with locale support, for the locales it's compiled to support. BusyBox can note that it only fully complies when in C/POSIX locale, and has limited support beyond that. Full disclosure: I used Claude Code to do some of this analysis, and then hand-checked it. It's kind of an experiment in doing things this way. I think it's correct, but welcome corrections. Here are the details. ## `-a` (Treat as Text) **Purpose**: Force diff to treat all files as ASCII text, even binary files. **Behavior**: When specified, diff will attempt to compare files character-by-character as text even if they contain appear to contain binary data or null bytes. Without this option, most diffs try to detect binary files and report only "Binary files differ." **Use Cases**: Comparing files that contain some binary data but are primarily text, or forcing comparison of files with unusual content that diff might misidentify as binary. **Implementation**: Supported by GNU, FreeBSD, and BusyBox. ## `-B` (Ignore Blank Lines) **Purpose**: Ignore blank lines when comparing files. **Behavior**: Lines containing only whitespace characters (spaces, tabs) or completely empty lines are treated as if they don't exist for comparison purposes. This is particularly useful when comparing code or configuration files where blank line differences are not semantically meaningful. **Technical Detail**: A "blank line" is defined as a line containing only characters that match the POSIX `[[:space:]]` character class or an empty line (length zero after removing the trailing newline). **Implementation**: Supported by GNU, macOS, FreeBSD, and BusyBox. ## `-d` (Minimal) **Purpose**: Use a minimal difference algorithm to find the smallest set of changes. **Behavior**: Instructs diff to expend extra computational effort to find the minimal set of differences between files. While POSIX states that diff should "make every effort" to be minimal, the reality is that by default implementations wisely don't make *every* effort. This option explicitly requests the most thorough algorithm available, even if it may cause a crash or many hours of analysis. **Performance Impact**: May significantly increase processing time for large files, but produces more readable and smaller difference sets. **Implementation Variance**: - GNU diff: Uses Myers algorithm with additional optimizations - BSD variants: May use different algorithmic approaches but achieve similar minimality - BusyBox diff: Partial implementation affecting the "bound" calculation in stone algorithm ## `-i` (Ignore Case) **Purpose**: Perform case-insensitive comparison of file contents. **Behavior**: When specified, diff treats uppercase and lowercase letters as equivalent during comparison. The locale-specific case conversion follows the LC_CTYPE category, ensuring proper handling of international character sets. **Implementation Notes**: - GNU diff: Implements full Unicode case folding - macOS diff: Uses system locale for case conversion - FreeBSD diff: Follows POSIX locale conventions - BusyBox diff: Simple ASCII-only case conversion (does not use LC_CTYPE locale) ## `-I` (Ignore Lines Matching Pattern) **Purpose**: Ignore lines that match a specified regular expression pattern. **Syntax**: `-I regexp` where regexp is a regular expression in the style specified by POSIX Extended Regular Expressions. **Behavior**: Lines in either file that match the specified pattern are excluded from comparison. This is invaluable for ignoring timestamp lines, version comments, or other automatically-generated content that changes frequently but isn't semantically important. **Multiple Patterns**: Most implementations allow multiple `-I` options to specify several patterns. If only one is supported, branching like '(first|second|third)' would do the same thing. **Example**: `diff -I '^#.*Date:' file1 file2` would ignore any lines beginning with `#` and containing `Date:`. **Implementation Status**: Supported by GNU, macOS, and FreeBSD. **Not implemented in BusyBox**. ## `-N` (New File) **Purpose**: Treat absent files as empty files during directory comparison. **Behavior**: When comparing directories, if a file exists in one directory but not the other, treat the missing file as if it were an empty file. This generates output showing all lines of the existing file as additions or deletions. **Rationale**: Essential for meaningful directory comparisons where files may be added or removed. Without this option, diff typically reports "Only in..." messages that provide less useful information for automated processing. **Implementation**: All major implementations (GNU, macOS, FreeBSD, BusyBox) support this consistently. ## `-q` (Brief/Quiet Mode) **Purpose**: Report only whether files differ, without showing the actual differences. **Behavior**: Instead of displaying line-by-line differences, diff outputs only a brief message stating whether files differ. If files are identical, no output is produced. For different files, outputs "Files X and Y differ." **Use Cases**: Shell scripts that only need to know if files are different without processing the actual differences, or batch operations where detailed output would be excessive. **Implementation**: Supported by GNU, FreeBSD, and BusyBox. ## `-s` (Report Same Files) **Purpose**: Report when two files are identical. **Behavior**: When files are identical, output "Files X and Y are identical." Normally, diff produces no output for identical files. This option is particularly useful in combination with `-q` or when processing multiple file pairs. **Use Cases**: Verification scripts that need confirmation of file identity, or batch operations where positive confirmation is required. **Implementation**: Supported by GNU, FreeBSD, and BusyBox. ## `-T` (Tab Alignment) **Purpose**: Insert a tab character instead of a space before line text for consistent alignment. **Behavior**: In unified and context diff formats, lines are normally prefixed with a space, `+`, or `-` followed by another space. This option replaces that second space with a tab character, ensuring consistent alignment regardless of the display environment's tab stop settings. **Use Cases**: When diff output will be processed by tools expecting tab-delimited fields, or for consistent formatting in environments with varying tab stop configurations. **Implementation**: Supported by GNU, FreeBSD, and BusyBox. ## `-w` (Ignore All Whitespace) **Purpose**: Ignore all whitespace differences when comparing files. **Behavior**: All sequences of whitespace characters (spaces, tabs, newlines within lines) are treated as equivalent. This means "hello world" would match "hello\t\tworld" or "hello world". **Distinction from `-b`**: While POSIX `-b` only ignores trailing whitespace, `-w` ignores all whitespace differences throughout each line. **Use Cases**: Particularly valuable when comparing code that may have been reformatted or when different editors have inconsistent whitespace handling. **Implementation**: Supported by GNU, macOS, FreeBSD, and BusyBox. ## `-x` (Exclude Pattern) **Purpose**: Exclude files and directories matching a specified shell pattern during recursive comparison. **Syntax**: `-x pattern` where pattern is a shell-style glob pattern (e.g., `*.tmp`, `backup*`). **Behavior**: When performing recursive directory comparisons (with `-r`), skip files and directories whose names match the specified pattern. Multiple `-x` options can be used to specify multiple exclusion patterns. **Use Cases**: Comparing source trees while ignoring temporary files, backup files, or build artifacts. **Example**: `diff -r -x '*.o' -x '*.tmp' dir1 dir2` excludes object files and temporary files. **Implementation**: Supported by GNU and FreeBSD. **Not implemented in BusyBox**. ## `-X` (Exclude From File) **Purpose**: Exclude files and directories matching patterns listed in a specified file. **Syntax**: `-X file` where file contains one exclusion pattern per line. **Behavior**: Similar to `-x`, but reads exclusion patterns from a file instead of the command line. Each line in the file is treated as a separate exclusion pattern. **Use Cases**: Projects with standard exclusion lists that are maintained as configuration files, or when the number of exclusion patterns would make command-line specification unwieldy. **Example**: `diff -r -X .diffignore dir1 dir2` where `.diffignore` contains patterns like `*.log`, `temp/`, `*.bak`. **Implementation**: Supported by GNU and FreeBSD. **Not implemented in BusyBox**. | ||||
Desired Action | # Changes to POSIX diff specification ## Synopsis Section Change from: ``` diff [-c|-e|-f|-u|-C n|-U n] [-br] file1 file2 ``` To: ``` diff [-c|-e|-f|-u|-C n|-U n] [-abdiqsNrTw] [-I regexp] [-x pattern] [-X file] file1 file2 ``` ## Description Section Change from: ``` This list should be minimal. ``` To: ``` This list should be reasonably minimal. ``` ## Options Section Add the following options in alphabetical order after existing options: **-a** Treat all files as text. Files that would otherwise be identified as binary files shall be treated as text files. **-B** Ignore lines that are blank. A blank line is a line that contains only <space> characters, <tab> characters, or is empty. **-d** Use a more aggressive algorithm to minimize the number of changes in the output. This may require significantly more time and memory. **-i** Ignore differences in case when comparing lines. Case conversion shall be performed according to the LC_CTYPE category. **-I regexp** Ignore lines in both files that match the Extended Regular Expression regexp. Multiple -I options may be specified; lines matching any of the patterns shall be ignored. **-N** If file1 or file2 is a directory and the other is not, or if one file is missing during directory comparison, treat the missing file as an empty file. **-q** Output only whether the files differ. Write to standard output a single line for each pair of files that differ: "Files file1 and file2 differ". Write nothing if the files are identical. **-s** Report identical files. When files are identical, write to standard output: "Files file1 and file2 are identical". **-T** On output, replace the second <space> character with a <tab> character in the line prefix for context and unified format outputs. **-w** Ignore all <space> and <tab> character differences when comparing lines. Any sequence of one or more <space> or <tab> characters shall be equivalent to any other such sequence. **-x pattern** During recursive directory comparison, exclude files and directories whose basename matches the shell pattern specified by pattern. Multiple -x options may be specified. Pattern matching follows the rules specified in XBD Pattern Matching Notation. **-X file** During recursive directory comparison, exclude files and directories whose basenames match any pattern in file. Each line in file shall be treated as a shell pattern following the same matching rules as -x. | ||||
Tags | No tags attached. |
|
Note: historically the `-a` option is for "ASCII", but I suspect this can be renamed to "as text". In *practice* these systems do line-by-line comparisons. I did some brief testing on MacOS diff, and it handles UTF-8 just fine with `-a`. |
|
At the meeting on 2025-09-12 I was asked to make some improvements to this, which I plan to do. I'm recording this information here so the plan will be documented and so people can correct me if I misunderstood something. There appeared to be general agreement that these were widely implemented and worthy of including in POSIX. However, at the meeting some needed clarifications were identified:
Once I've completed my investigations, I intend to post an updated proposal that uses a restricted HTML as documented in https://www.austingroupbugs.net/proj_doc_page.php ; this limits HTML tags to p, li, ul, ol, br, pre, i, b, u, em, blockquote. If there's anything wrong/missing in this plan, please let me know. |
|
Re 0001942:0007257 item 2, the desired action has statements about what is written to standard output for -q and -s. The point I made in the meeting was that those details should be in the STDOUT section, not in the option descriptions. Also, specific English text should only be required for the POSIX locale. For item 3, the way we usually handle cross-references in editing instructions is to put, e.g.: See [xref to XBD 4.1 Case Insensitive Comparisons].The editor then converts the part in brackets to a .cX macro with the relevant internal tag name for that section. |
|
Here are the questions and my attempted answers, followed by partially-updated proposal for diff. This is NOT a completed proposal; I just wanted to share my progress so far. That said, any comments on this work-in-progress is appreciated. My baseline is the POSIX 2024 diff specification visible at: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/diff.html and the proposals are here at https://www.austingroupbugs.net/view.php?id=1942 My proposal adds the following options to diff: -a (all files as text), -B (blank lines ignored), -d (aggressive diffing), -i (ignore case difference), -I regexp (ignore these lines), -N (missing is new), -q (brief report if differ), -s (report if same), -T (tabs), -w (whitespace), -x pattern (exclude files), -X file (exclude patternfile). I've learned that the -T option has some fiddly details to be addressed that are not fully addressed here (yet). Regarding the questions raised: 1. If standard input is an input (e.g., "-"), what filename is reported? Is it "(standard input)" everywhere, or something else? Ideally there would be a standard answer, and if not, it should be clearly noted that it may vary by implementation. I'll need to see what implementations do in this case. The current spec already says for -c or -C, "The pathname written for standard input is unspecified." It also already says that for -u or -U, "Each <file> field shall be the pathname of the corresponding file being compared, or the single character '-' if standard input is being compared." I don't intend to change that. So I think the key issue is the new -q and -s options for "-". I determined that "-" appears to be the answer in implementations. It's also important to determine if locale matters. I also installed the French (fr_FR.UTF-8) on my Debian system to further test the GNU and Busybox versions, and I saw no differences. Here is my justification. I ran this to test -q on Linux (GNU), Busybox, and FreeBSD: seq 1 30 > seq1-30.txt export LANG=fr_FR.UTF-8 export LC_ALL=fr_FR.UTF-8 seq 1 25 | diff -q - seq1-30.txt 2> /dev/null This produced exactly "Files - and seq1-30.txt differ" on GNU diff, Busybox diff ("busybox diff..."), and FreeBSD diff - even in the French locale. To test -s, I ran: seq 1 30 | diff -s - seq1-30.txt 2> /dev/null This produced exactly "Files - and seq1-30.txt are identical" on GNU diff, Busybox diff, and FreeBSD diff, even in the French locale. I did find a Busybox bug. The command "diff -s seq1-30.txt seq1-30.txt" produced the expected results on GNU diff and FreeBSD, namely "Files seq1-30.txt and seq1-30.txt are identical". However, when the *same* filename is given to Busybox diff it produces NOTHING. I have no objections to optimizing computations (like noticing the same file was sent), but I think this is a clear bug in busybox. "Tell me if the files are the same" should do exactly that. Busybox has no problems providing the expected output when given *different* files: cp seq1-30.txt seq1-30-dup.txt $ busybox diff -s seq1-30.txt seq1-30-dup.txt Files seq1-30.txt and seq1-30-dup.txt are identical I think we should standardize common and expected behavior, and report a bug to Busybox. Normally you don't compare files to exactly themselves anyway, so this is probably not a bug anyone has encountered in real life. It would be possible to make this case implementation-defined, but I think this is a bug and should be treated as such. 2. What's the impact of -q and -s? Do they send to standard output? How do they interact? Are they locale-dependent? Let me answer the question as I originally understood it, and then reply to the later explanation, in the hopes that I fully answer the question. Yes, their outputs are sent to standard out (I checked by redirecting stderr from multiple implementations). No, they're not locale-dependent, the output is the same (presumably the intention is to aid scripts). I tried this no GNU and FreeBSD with French locale fr_FR.UTF-8. The -q and -s flags interact in the "obvious" way required by their definitions. Basically, if you use both, you always have an output when comparing 2 files, and it indicates if they differ or are the same. I don't think that needs special documentation. I think the problem is that my earlier description wasn't clear enough, so I rewrote it hopefully be clear. Here's what they do: $ diff -qs seq1-30.txt seq1-30-dup.txt Files seq1-30.txt and seq1-30-dup.txt are identical $ diff -qs seq1-30.txt seq1-25.txt Files seq1-30.txt and seq1-25.txt differ The "-s" only does anything different when two compared files are considered the same. The files may have some differences, e.g., per the -B flag, but what matters is whether or not they're considered different by diff. I'll clarify that in the options text. geoffclare later clarified: "Re 0001942:0007257 item 2, the desired action has statements about what is written to standard output for -q and -s. The point I made in the meeting was that those details should be in the STDOUT section, not in the option descriptions. Also, specific English text should only be required for the POSIX locale." Sorry I misunderstood. Sure, I'll do that. 3. The "-i" (Ignore Case) should refer to Refer to XPD 4.2 - general concepts (case-insensitive) (spelling?). Review the similar references to use the same format. Agreed. Done. I used grep as my template. 4. Does "-w" ignore space and tab, or ignore whitespace? The initial draft was inconsistent. There's other whitespace than space or tab. Is it locale-specific? I tested on GNU, Busybox, and FreeBSD. The "-w" consistently ignores *only* these whitespace characters: U+9 (TAB), U+B (VT), U+C (FF), U+D (CR), U+20 (SPACE). It does not ignore *any* of the other Unicode whitespace characters (there are 25 in the current spec). I can't say I tried it on all locales, but I tried it with French (fr_FR.UTF-8) and I saw no evidence of locale dependence. The "-B" only ignores *fully* blank lines by itself (portably). The *combination* of -Bw has an annoying implementation difference: - GNU diff: Treats lines with only "-w" whitespace as equivalent to an empty line (and thus ignored) - FreeBSD diff: Does NOT treat lines with only "-w" whitespace as equivalent to an empty line (and thus they are still compared) This difference only seems to happen when the options are *combined*, so I documented combination as implemention-defined behavior with the two options identified. See this test script if you want to investigate this: http://dwheeler.com/misc/diff-whitespace-test.sh Here are a few additional notes. The GNU documentation for -q (--brief) says, "report only when files differ". That text is misleading, ecause diff *normally* only reports when files differ, yet the text implies otherwise. The FreeBSD documentation is a little clearer: "Just print a line when the files differ. Does not output a list of changes." GNU and FreeBSD differ on what -T does when there's no change. FreeBSD outputs space-tab (no change, then indent). GNU outputs a tab (merging the 'no change' space and the indent). To see this you need to use od -c or similar, since visually they look the same. I think that could be "implementation-defined" without serious issue, it's a little messy but it's also reality, and it really isn't hard to handle programmatically once you know it can happen. * * * INCOMPLETE proposed changes to POSIX diff specification: Synopsis Section: Change from: diff [-c|-e|-f|-u|-C n|-U n] [-br] file1 file2 To: diff [-c|-e|-f|-u|-C n|-U n] [-abdiqsNrTw] [-I regexp] [-X file] [-x pattern] file1 file2 Description Section: Change "This list should be minimal." to "This list should be reasonably minimal." because really, that's all you can hope for. Options Section: Add the following options in alphabetical order in addition to existing options: -a Treat all files as text. Files that would otherwise be identified as binary files shall be treated as text files. -B Ignore lines that are blank. A blank line is a line that is empty (contains no characters). -d Use a more aggressive algorithm to minimize the number of changes in the output. This may require significantly more time and memory. -i Compare lines in a case-insensitive manner (using LC_CTYPE); see XBD 9.2 Regular Expression General Requirements. -I regexp Ignore lines in both files that match the Extended Regular Expression regexp. Multiple -I options may be specified; lines matching any of the patterns shall be ignored. Perform pattern matching in a case-insensitive manner; see XBD 9.2 Regular Expression General Requirements. -N If file1 or file2 is a directory and the other is not, or if one file is missing during directory comparison, treat the missing file as an empty file. -q If files have a reportable difference, output only that they differ instead of the details about their differences. By default all differences in files are reported, but options can change this (see -i, -I, -B, and -w). -s If files are considered the same (do not have a reportable difference), report that they are the same instead of being silent. -T Write a tab instead of a space before the line information about differences (to make tab alignment consistent). -w Ignore differences in sequences of equivalent whitespace when comparing lines. The following characters are treated as equivalent whitespace: <space> (U+20), <tab> (U+9), vertical tab (U+B), form feed (U+C), and carriage return (U+D). Any sequence of one or more of these characters shall be considered equivalent to any other such sequence of one or more such characters. Other whitespace characters are not treated as equivalent. -x pattern During recursive directory comparison, exclude files and directories whose basename matches the shell pattern specified by pattern. Multiple -x options may be specified. Pattern matching follows the rules specified in XBD Pattern Matching Notation. -X file During recursive directory comparison, exclude files and directories whose basenames match any pattern in file. Each line in file shall be treated as a shell pattern following the same matching rules as -x. Note: The interaction between -B and -w options when applied together (-Bw) is implementation-defined. An implementation may or may not consider lines containing only the whitespace characters of -w as blank lines when both options are used together. In the later "STDOUT" section: BEFORE the subsection "Diff Default Output Format" add this text and these two subsections: By default "indent" is a space character; with -T it becomes a tab character. Diff brief considered different form (added) If the -q option is specified and the compared files are considered different (have reportable differences), a diagnostic line is written to standard output to note that there are differencs instead of describing those differences. In the POSIX locale, the following format is written in this case: "Files %s and %s differ\n", <filename1>, <filename2> Diff considered same form (added) If the -s option is specified and the compared files are considered the same (have no reportable differences), then instead of no output, a diagnostic line is written to standard output to the note that they are the same. In the POSIX locale, the following format is written in this case: "Files %s and %s are identical\n", <filename1>, <filename2> Diff Default Output Format Change: "The default (without -e, -f, -c, -C, -u, or -U options) diff utility output shall contain lines of these forms:" to: "The default (without -e, -f, -q, -c, -C, -u, or -U options) diff utility output shall contain lines of these forms where there are reportable differences:" ... TODO: the output section must be modified to handle -T. It shouldn't add much length, but there will be many small changes. Again, this is work in progress, not a complete proposal, but I wanted to share what I've learned so far. |
|
> 3. The "-i" (Ignore Case) should refer to Refer to XPD 4.2 - general concepts (case-insensitive) (spelling?). Review the similar references to use the same format. > > Agreed. Done. I used grep as my template. You should not have used grep as the template, because diff -i does not involve regular expressions. The cross-reference should be given exactly as in 0001942:0007268. Comments on the proposed changes... The last part should be alphabetical:diff [-c|-e|-f|-u|-C n|-U n] [-abdiqsNrTw] [-abdiNqrsTw] <b<-B Ignore lines that are blank. A blank line is a line that is empty (contains no characters).This contradicts the definition of "blank line" in XBD 3.46. Please change to say "Ignore empty lines." ("Empty line" is defined in XBD 3.120.) Also, it would be better to handle the interaction with -w here rather than after the (long) list of options, for better visibility. E.g. "If the -w option is in effect, it is implementation-defined whether lines containing only the whitespace characters ignored by -w are treated as empty lines." -i Compare lines in a case-insensitive manner (using LC_CTYPE)The requirement to use LC_CTYPE for this should be stated in the ENVIRONMENT VARIABLES section, not here. -I regexp Ignore lines in both files that match the Extended Regular Expression regexp. Multiple -I options may be specified; lines matching any of the patterns shall be ignored.This doesn't match the GNU and FreeBSD man pages for -I. GNU says "ignore changes where all lines match RE"; FreeBSD says (in part) "All lines in the change must match some pattern for the change to be ignored." This aspect of the behaviour needs to be specified. Perform pattern matching in a case-insensitive manner; see XBD 9.2 Regular Expression General Requirements.I assume that's a typo and you meant case-sensitive. Also, since this is not the first sentence it should not be in imperative form, and I think it's worth emphasising that -i has no effect on this. So I'd suggest: Pattern matching shall be performed in a case-sensitive manner, even if the -i option is in effect; see [xref to XBD 9.2 Regular Expression General Requirements]. -N If file1 or file2 is a directory and the other is not, or if one file is missing during directory comparison, treat the missing file as an empty file.This contradicts the last paragraph of OPERANDS: "If only one of file1 and file2 is a directory, diff shall be applied to the non-directory file and the file contained in the directory file with a filename that is the same as the last component of the non-directory file." I suggest just keeping it simple: -N Treat non-existent files as empty files. -T Write a tab instead of a space before the line information about differences (to make tab alignment consistent).Since this is quite vague, I'd suggest adding "See the STDOUT section for details." -w [...]This should be worded in a manner consistent with the description of -b. It's possible -b needs tweaking as well, in particular do implementations treat strings of any white-space characters (except newline) as equivalent, or only those in the portable character set? It seems unlikely there would be inconsistency between -b and -w on this for an implementation. -x pattern [...] shell pattern [...]Please re-word using the description of find -name as a guide for how to specify the pattern matching. Likewise for -X. Multiple -x options may be specified.Change "may" to "can". a diagnostic line is written to standard outputAlthough not a strict rule, the standard tends only to use "diagnostic" for messages written to standard error. Just "a line" would work fine here. Also this and other uses of present tense in the STDOUT additions should change to use "shall". |
|
geoffclare: Thank you VERY MUCH for your detailed response! I appreciate it. Once I finish my research on tabs, I'll address your comments in my next revision of the proposal. |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-08-31 22:16 | dwheeler | New Issue | |
2025-08-31 22:16 | dwheeler | Status | New => Under Review |
2025-08-31 22:16 | dwheeler | Assigned To | => ajosey |
2025-09-01 15:08 | dwheeler | Note Added: 0007248 | |
2025-09-11 15:50 | geoffclare | Project | 1003.1(2008)/Issue 7 => 1003.1(2024)/Issue8 |
2025-09-12 14:43 | dwheeler | Note Added: 0007257 | |
2025-09-12 14:44 | dwheeler | Note Edited: 0007257 | |
2025-09-12 14:45 | dwheeler | Note Edited: 0007257 | |
2025-09-18 16:00 | geoffclare | Note Added: 0007268 | |
2025-09-18 16:01 | geoffclare | Note Edited: 0007268 | |
2025-10-05 00:19 | dwheeler | Note Added: 0007283 | |
2025-10-09 11:16 | geoffclare | Note Added: 0007284 | |
2025-10-09 14:40 | dwheeler | Note Added: 0007285 |