ref: 0794da22bcd58a47e7f748b14d1bbeda84ea7bc3
parent: 6df75f7af3ccd28ad2432460cacdf853edb1113d
author: ISSOtm <eldredhabert0@gmail.com>
date: Tue Sep 13 04:34:41 EDT 2022
Clarify at-files documentation
--- a/man/rgbgfx.1
+++ b/man/rgbgfx.1
@@ -321,8 +321,23 @@
.Pq Ql @
is interpreted as one.
The rest of the argument (without the @, that is) is interpreted as the path to a file, whose contents are interpreted as if given on the command line.
-At-files can be stored right next to the corresponding image, for example.
+At-files can be stored right next to the corresponding image, for example:
.Pp
+.Dl $ rgbgfx -o image.2bpp -t image.tilemap @image.flags image.png
+.Pp
+This will read additional flags from file
+.Ql image.flags ,
+which could contains for example
+.Ql -b 128
+to specify a base offset for the image's tiles.
+The above command could be generated from the following
+.Xr make 1
+rule, for example:
+.Bd -literal -offset indent
+%.2bpp %.tilemap: %.flags %.png
+ rgbgfx -o $*.2bpp -t $*.tilemap @$*.flags $*.png
+.Ed
+.Pp
Since the contents of at-files are interpreted by
.Nm ,
.Sy no shell processing is performed ;
@@ -336,17 +351,19 @@
Each line can contain any number of arguments, which are separated by whitespace.
.Pq \&No quoting feature to prevent this is provided.
.Pp
-Note that this special meaning given to arguments has less precedence than option arguments, and that the standard
+Note that a leading
+.Ql @
+has no special meaning on option arguments, and that the standard
.Ql --
to stop option processing also disables at-file processing.
-For example, the following command line processes
-.Ql @tilesets/town.png ,
-outputs tile data to
-.Ql @tilesets/town.2bpp ,
-and reads command-line options from
+For example, the following command line reads command-line options from
.Ql tilesets/town.flags
then
-.Ql tilesets.flags :
+.Ql tilesets.flags ,
+but processes
+.Ql @tilesets/town.png
+as the input image and outputs tile data to
+.Ql @tilesets/town.2bpp :
.Pp
.Dl $ rgbgfx -o @tilesets/town.2bpp @tilesets/town.flags @tilesets.flags -- @tilesets/town.png
.Pp