NodeProfile class
A node's environment profile, persisted at ~/.omnyshell/profile.yaml and
applied as the baseEnvironment of every shell/exec session the node serves.
Sessions run the node's shell non-interactively, so no rc file
(.zshrc, .bashrc, ...) is sourced; this profile is how a node carries a
prepared PATH (and any other env the operator adds) into every session.
File shape:
env:
PATH: "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
EDITOR: vim
Values may reference other variables with ${VAR}/$VAR; these are expanded
at load time against the node's own environment, because the resulting
strings are passed verbatim to Process.start (no shell interprets them).
Constructors
-
NodeProfile(Map<
String, String> env) -
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
defaultPath(
{String? home}) → String -
The default profile path,
~/.omnyshell/profile.yaml(honoringOMNYSHELL_HOME/HOME).homeoverrides the base directory in tests. -
load(
{String? path, String? home, Map< String, String> ? environment}) → NodeProfile -
Loads the profile from
path(defaults to defaultPath). -
writePath(
String path, String pathValue) → void -
Writes the
PATHentry ofpath's profile topathValue, preserving any otherenventries and surrounding comments. Creates the file (and its parent directory) from a template when it does not yet exist.
Constants
- empty → const NodeProfile
- An empty profile (no overrides).