### Description It's pretty common for me to determine the location of my more trivial (non-Bashly) scripts using code like this: ```bash SCRIPT_PATH="$(readlink -f "$0")" ``` However I don't see any way for me to inject code at the top level of the generated script where I have access to `$0` as set by Bash during script startup. I have a couple ideas that could solve this problem for me: 1. Solve the problem very generically: Similarly to the `initialize.sh` function hook, create a `toplevel.sh` hook that allows users to add raw code (NOT wrapped in a function) just before the `run` function is called. 2. Solve the problem specifically: Populate a readonly `THIS_SCRIPT` variable at the top of the generated script via ```bash readonly THIS_SCRIPT="$0" ``` I lean a bit more toward option 2 personally. It would allow me to then write code like this: ```bash FULL_SCRIPT_PATH="$(readlink -f "$THIS_SCRIPT")" ``` Though option 1 could admittedly be useful for reasons I haven't thought of yet.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by pcrockett and has received 4 comments.