You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose function lookup/dispatch API for embedded hosts #16
Winuxsh is moving interactive startup to a primary ~/.winuxshrc entry point and an Oh-My-style framework. The framework registers lifecycle hook runners such as winuxsh_run_precmd_hooks, winuxsh_run_preexec_hooks, and winuxsh_run_chpwd_hooks as shell functions.
Today the Winuxsh host can source rc/framework code into the embedded rubash Executor, but there is no clean host-side API to ask whether a shell function exists or to invoke a function with temporary environment/context. The current workaround is to execute shell text such as:
winuxsh_run_precmd_hooks 2>/dev/null ||true
That works, but it is not an ideal embedded-host contract: it hides missing functions as generic command-not-found behavior, may perform normal command lookup, and makes lifecycle integration harder to reason about.
Requested API shape, exact names flexible:
query whether a function is defined in the current Executor state;
invoke a named shell function without external PATH lookup;
pass temporary env/context for the call and restore it afterwards, or at least document the recommended host pattern;
preserve normal rubash exit-status semantics for the function body.
This would let Winuxsh call framework lifecycle hooks directly while keeping plugin/framework behavior out of Winuxsh core and avoiding brittle shell-string probes.
Activity