refactor: change ce | ee to v | prefix for shell prompt

reason: 'ce' (Community Edition) is only for internal use,
when it comes to user/customer facing descriptions,
we should use Opensource edition and Enterprise edition.

Similary, for user/customer facing shell prompt,
use `v` for Opensource edition and `e` for Enterprise
This commit is contained in:
Zaiming (Stone) Shi 2022-12-14 13:05:44 +01:00
parent ff429fe4e5
commit 0412826dd5
1 changed files with 7 additions and 3 deletions

View File

@ -45,10 +45,14 @@ set_prompt_func() ->
prompt_func(PropList) ->
Line = proplists:get_value(history, PropList, 1),
Version = emqx_release:version(),
Edition = emqx_release:edition(),
Prefix =
case emqx_release:edition() of
ce -> "v";
ee -> "e"
end,
case is_alive() of
true -> io_lib:format(<<"~ts-~ts(~s)~w> ">>, [Edition, Version, node(), Line]);
false -> io_lib:format(<<"~ts-~ts ~w> ">>, [Edition, Version, Line])
true -> io_lib:format(<<"~ts~ts(~s)~w> ">>, [Prefix, Version, node(), Line]);
false -> io_lib:format(<<"~ts~ts ~w> ">>, [Prefix, Version, Line])
end.
local_allowed(MF, Args, State) ->