Open krader1961 opened 1 year ago
How about a pattern like this:
# file: public.elv
use ./private
fn public {
echo "I am not as shy as THAT guy!"
echo "THAT guy:" (private:private)
}
del private:
# file: private.elv
fn private {
put "Don't look at me!"
}
This results in the following behaviour:
~> use ./public
~> keys $public:
▶ public~
~> public:public
I am not as shy as THAT guy!
THAT guy: Don't look at me!
The
epm
module distinguishes public, versus private, functions by prefixing the latter with-
. The problem is that the-
prefix convention means the function is experimental and subject to change. Not that it is private. Such functions still appear in the command completion output. Such as when typingepm:
then Tab:Perhaps the command completion logic should ignore commands with a
-
prefix. Adding a mechanism for Elvish modules to explicitly document their external API is another solution but that is significantly more complicated.