@include useful features: PROCINFO[ "include" ] array

23 views
Skip to first unread message

Digi

unread,
Jan 6, 2022, 5:45:22 PMJan 6
to
hello!

i know that there is no more gawk feature request like topic. so i'm just voicing my thoughts.

it's will be nice if gawk script may gets full filepath of the every files that was @included

like if PROCINFO[ "include" ] is the predefined subarray containing as the indexes full filepaths of the all files included.

some of my libraries needs to load and process some files during initialization.

the files are logically located at the same location as the file included. this will lead to problems with runing my scripts from non-hardcoded locations.

if such kind include-file list will be provided by gawk the library's initializations may find itself in this list and then just get location of the file required

and it is possible that dynamic extensions also may needs such kind feature.


also:

it's will be very useful and whats more important - more correct if for @include directives located in a file the current directory will be directory from where file was been loaded - not the user's current folder as it's currently in gawk.

many of my include files contains nested subincludes that should loaded exactly from where original include file was get.

also:

it's will be nice if @include directive may support access to environment variables like it's realized in batch files:

@include "%AWKPATH%/arr/arr.inc"


Best Regards
Denis

Ed Morton

unread,
Jan 6, 2022, 6:27:21 PMJan 6
to
On 1/6/2022 4:45 PM, Digi wrote:
> hello!
>
> i know that there is no more gawk feature request like topic. so i'm just voicing my thoughts.

Not sure what that means but you can contact the gawk developers about
non-bug issues by emailing them at "help dash gawk at gnu dot org".

See https://www.gnu.org/software/gawk/manual/gawk.html#Asking-for-help
for more info.

Ed.
Reply all
Reply to author
Forward
0 new messages