run
run copied to clipboard
Make it easier to export attributes
In order to actually use attributes in scripts, commands need to first convert them into environment variables, which often leads to verbose assignments like:
(assumes #55 merged)
export RUNFILE_DIR := ${.RUNFILE.DIR}
Perhaps we can make exporting attributes easier for the user:
Quick Export
A quick export could be as easy as:
##
# export .RUNFILE.DIR
#
main:
echo $RUNFILE_DIR
ie. the quick export rules could be:
- Ignore the leading
. - Replace
.with_
Export With Rename
We could also support an easy way to export with a different name:
##
# export .RUNFILE.DIR as RFD
#
main:
echo $RFD
Support Variables Too?
The as syntax could also be used as a way to export standard variables with a different name.
Although I'm not sure how useful this would be?
Even if its not overly useful, we might want to support it just for symmetry with attributes