I've developed hundreds of bash scripts with Geany, and have always been able to click Execute and they run properly. Many of these scripts make use of the $0 variable - that is - the path the script was run with. So if I'm editing `/home/pi/myfolder/myscript.sh`, then $0 is `/home/pi/myfolder/myscript.sh`.
Well just yesterday that behavior changed. Now $0 is `./myscript.sh` - not with the full path anymore. Using Geany, I tried executing multiple scripts that worked fine the day before, but all of them failed now because the scripts were no longer being run from their full path.
Running the scripts from a terminal, using their full paths, still works fine.
I don't remember changing any Geany settings, but is there a setting somewhere with which I can change its Execute behavior back to how it was?
`Set Build Commands` in the `Build` menu is where you can configure the `Execute` command.
So I have: ![2020-10-06-095413_1920x1080_scrot](https://user-images.githubusercontent.com/54716352/95218513-f541b380-07b9-11...) What would I need to put in which blanks to get this up and running again?
The default is in your system `filetypes.sh` and as distributed is `"./%f" but that won't give full path AFAIK so you must have modified the setting yourself. Can't tell you what you modified it to, but a guess might be `"%d%f"`.
The default is in your system `filetypes.sh` and as distributed is `"./%f"` but that won't give full path AFAIK so you must have modified the setting yourself. Can't tell you what you modified it to, but a guess might be `"%d%f"`.
I never did change it. I didn't even know that option existed! But setting it to "%d/%f" did work, so thanks for the pointer.
Closed #2611.
github-comments@lists.geany.org