[Bro-Dev] #869: Mechanism for discovering current script name
Bro Tracker
bro at tracker.bro.org
Wed Jun 5 08:57:46 PDT 2013
#869: Mechanism for discovering current script name
----------------------------+------------------------
Reporter: seth | Owner:
Type: Merge Request | Status: new
Priority: Normal | Milestone: Bro2.2
Component: Bro | Version: git/master
Resolution: | Keywords: language
----------------------------+------------------------
Comment (by jsiwek):
Replying to [comment:6 robin]:
> Thanks. One more thing (I've already argued with Seth about this :) For
me "path" suggests *full* path including the script's file, while this
returns only the directory where the script is located in. Would you
object to changing that? Alternatively, how about using {{{@DIR}}} instead
of {{{@PATH}}}? (or maybe {{{@CWD}}}?)
`@CWD` is confusing since it can expand to something that's actually not
the working dir of the process.
I see how `@PATH` can be ambiguous, I'll change it to `@DIR`. That can
only be interpreted one way.
I'll add `@FILENAME` to expand to the file name (no path), so you can do
`@DIR + "/" + @FILENAME` for an absolute file path if that's needed.
--
Ticket URL: <http://tracker.bro.org/bro/ticket/869#comment:8>
Bro Tracker <http://tracker.bro.org/bro>
Bro Issue Tracker
More information about the bro-dev
mailing list