help-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@include suggesting feature: PROCINFO[ "include" ] array


From: Denis Shirokov
Subject: @include suggesting feature: PROCINFO[ "include" ] array
Date: Fri, 7 Jan 2022 21:41:01 +0200

hello Gawk Team

i'm just voicing my thoughts about the include directive features
thats may be useful for gawk's user:

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]