[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: execute_cmd.h is not included in installed headers
From: |
Chet Ramey |
Subject: |
Re: execute_cmd.h is not included in installed headers |
Date: |
Mon, 2 May 2022 16:47:52 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 |
On 5/2/22 4:03 PM, Robert E. Griffith wrote:
>> What's your use case?
I have a bash script library that supports Objects and Classes in bash
script. I am now writing a loadable builtin to speed up the object call and
other mechanisms.
echo "'$obj'"
'_bgclassCall heap_A_XXXXX MyClass 0 |'
$obj.doSomething p1 p2
_bgclassCall is a function that sets up the method context (e.g. local -n
this=heap_A_XXXXX), and then calls the shell function that corresponds to
'doSomething' (e.g. MyClass::soSomething)
_bgclassCall has a bash implementation but when the new builtin is loaded I
suppress the bash version so the builtin is used.
It also comes up for example if I want to implement the ConstructObject
function as a builtin, it identifies and runs the __constructor shell
functions while building up the object instance.
That seems reasonable. I'll add it.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/