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

Re: Env["PWD"], why not?


On Saturday, April 19th, 2025 at 12:07, Bruce Steers bsteers4@xxxxxxxxx wrote:

> a hack? dang the other day it was an undocumented feature :(
> Seemed to me like a handy feature.
> Oh well. Thanks for the reply.
>
> I could "hack" Shell easy enough by adding "cd " & Shell(sDir) & "; " to the start of the command string but how could i hack Exec as it's only single commands?
>
> Respects
> BruceS

You can hack the single command part of Exec by adding System.Shell as first item, "-c" as second and the full command string as third.
Here is an example of some code of mine I use to make code created scripts executable.

sCommand = Subst("chmod u+x &1", $sLoadedFile)
Wait 0.01
Exec [System.Shell, "-c", sCommand] Wait

gbWilly

References:
Env["PWD"], why not?Bruce Steers <bsteers4@xxxxxxxxx>
Re: Env["PWD"], why not?Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Env["PWD"], why not?Bruce Steers <bsteers4@xxxxxxxxx>