From c0fd33aaef5f345566a41c7c2558f27adf05558b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 3 Jun 2024 14:34:54 -0400 Subject: parse: Handle multiple flags at once like -LEXO2 The POSIX Utility Syntax Guidelines specify that flag groups like -HL should be handled like -H -L. GNU find doesn't support grouping flags in this way, but BSD find does. To avoid conflicts with non-flag primaries, for now we require at least one flag in a group to be a capital letter. That is, we support things like -Lds but not -ds. We also do not support -fPATH (without a space) as it would conflict with -follow, -fprint, etc. It is impossible to be compatible with both GNU and BSD find here: user@gnu$ find -follow link link/file ... user@bsd$ find -follow find: ollow: No such file or directory Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html --- tests/bsd/Hf.out | 1 + tests/bsd/Hf.sh | 1 + 2 files changed, 2 insertions(+) create mode 100644 tests/bsd/Hf.out create mode 100644 tests/bsd/Hf.sh (limited to 'tests/bsd') diff --git a/tests/bsd/Hf.out b/tests/bsd/Hf.out new file mode 100644 index 0000000..ff635ff --- /dev/null +++ b/tests/bsd/Hf.out @@ -0,0 +1 @@ +links/deeply/nested/dir diff --git a/tests/bsd/Hf.sh b/tests/bsd/Hf.sh new file mode 100644 index 0000000..333280c --- /dev/null +++ b/tests/bsd/Hf.sh @@ -0,0 +1 @@ +bfs_diff -Hf links/deeply/nested/dir -- cgit v1.2.3