On Apr 30, 2007, at 12:17 , Ian Piumarta wrote:
On Apr 30, 2007, at 3:08 AM, subbukk wrote:
For scripts, it does pathname expansion, opens the file to detect shebang interpreter and then passes the fullpath as $0 to the interp. Therefore, $0 in a shell script will contain the full pathname.
I've tried this on many different shells and it appears to be reliable only if there are no dirnames in the command. Typing a relative path to the script breaks it. However, it's nothing that a call to realpath() can't cure so here's what I propose to do, unless someone else can think of a reason not to:
- Remove ./ from the list of places searched.
- Merge SQUEAK_PLUGINS and SQUEAK_PLUGIN_PATH into one.
- Fix any relative paths in SQUEAK_PLUGIN_PATH via realpath().
- Make SQUEAK_PLUGIN_PATH be the first place searched.
This would give you what you're asking for (use the -plugins option) with the smallest change to the behaviour of the binary.
Sounds good to me.
- Bert -