Re: Building loadable builtin

2022-04-14 Thread Chet Ramey
On 4/14/22 1:48 PM, Robert E. Griffith wrote: Are there any resources available for understanding the bash internals more? Only the source code. Is this an appropriate place to ask questions on that or is there better place for that? You can ask on help-bash too, since this isn't really a

Re: Building loadable builtin

2022-04-14 Thread Chet Ramey
On 4/14/22 12:52 PM, Robert E. Griffith wrote: I am developing a loadable builtin and I have a question about building it for distribution. I am currently building it in the "Bash-5.0 patch 17" git commit and it works fine when I run it in the bash executable built from that same commit (5.0.

Re: Building loadable builtin

2022-04-14 Thread Robert E. Griffith
Thanks Jesse, that's a great post. I wish I had found it when I started. I wonder why its not higher on a google of "bash loadable builtin". It would have saved me a lot of time figuring out how some of the internals work like creating variables and understanding the global vs in-function state

Re: Building loadable builtin

2022-04-14 Thread Jesse Hathaway
On Thu, Apr 14, 2022 at 11:52 AM Robert E. Griffith wrote: > Question 3: what is the best practice for maintaining loadable builtins? > Can anyone suggest an existing loadable builtin project that I could > model mine after? I don't have too much advice on best practices, but I did write a blog p

Building loadable builtin

2022-04-14 Thread Robert E. Griffith
I am developing a loadable builtin and I have a question about building it for distribution. I am currently building it in the "Bash-5.0 patch 17" git commit and it works fine when I run it in the bash executable built from that same commit (5.0.17(4)) but it fails when I run it in the bash fr