From 6ea3d907eb7099afd8798705d4a9a620c82566bc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 30 May 2017 15:57:51 +0200 Subject: Update testcript cleanup wildcard spec --- doc/testscript.cli | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/testscript.cli b/doc/testscript.cli index 4c585ec..79dcbce 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -2146,15 +2146,24 @@ the file/directory is removed if it exists. Finally, \c{&!} is a \i{never} cleanup: it disables a previously registered cleanup for this file/directory (primarily used to disable automatic cleanups registered by builtins). -The last component in the path may contain a wildcard with the following -semantics: +The path components may contain the \c{*} and \c{?} wildcard characters +with the following semantics: \ -dir/* - all immediate files -dir/*/ - all immediate sub-directories (which must be empty) -dir/** - all files recursively -dir/**/ - all sub-directories recursively (which must be empty) -dir/*** - all files and sub-directories recursively and dir/ +? - any single character +* - all immediate files +*/ - all immediate sub-directories (which must be empty) +** - all files recursively +**/ - all sub-directories recursively (which must be empty) +*** - all files and sub-directories recursively as well as the start + directory itself +\ + +For example, the following cleanup will remove \c{dir/} and its content +recursively. + +\ +$* &dir/*** \ Registering a path for cleanup that is outside the script working directory is -- cgit v1.1