Spawn external from within a rule
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
This idea came from #2095
Solar: It makes me thinking what command character we'd (eventually) use for executing an external mode function from a ruleset, though - 'e' could have stood for "external" - but perhaps this should in fact be a separate topic
As for external being called as a rule, I really only see calling a filter function, to modify the word or reject it.
As for the rule to use, these are already spoken for (where there are letters available of either case, there is a gap)
A cCdDeE f iI kKlL M oOpPqQ rRsStTuUvV xXyYzZ { } [ ] () <> _ ' : / $ ^ # % @ ! = \ * + - . , 12 4 6
So we can see we are getting pretty 'tight' on letters. For calling an external function, could we view this as a 'spawn', and wrap it in sh syntax? function ?
The ` is not used, and seems a 'safe' bet. That way, we could even comment it could be a extern function or even a system spawn (Yes, I know solar will not agree, but we can wish, lol).
So a rule such as:
\]\]$[a-f0-9]$[ -~]ccorp_complexity``
would chop last 2 letters, append a hex, then some other ascii char, then case the word, and then finally call the corp_complexity 'script/external' which would accept or cause the final word to be dropped as not meeting some corp standard.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files, tests, or entry points. Start by locating the ruleset parser and existing external or filter-function handling, then clarify the proposed syntax and execution behavior; done would require an agreed design and corresponding implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, shell
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100