From d408624afeb0035217d3d327e21b24a62b803f28 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Sat, 30 Mar 2024 19:05:23 -0600 Subject: Add wrapper for global shell environment Instead of having to pass around a bunch of different data structures for various shell functions, create the wrapper compose::Environment, which serves as a global shell state. It is configured via login/profile/rc scripts initially, but can of course be modified throughout the lifetime of the shell. --- src/compose/environment.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/compose/environment.rs (limited to 'src/compose/environment.rs') diff --git a/src/compose/environment.rs b/src/compose/environment.rs new file mode 100644 index 0000000..219a597 --- /dev/null +++ b/src/compose/environment.rs @@ -0,0 +1,13 @@ +pub struct Environment { + pub aliases: Vec, + pub bins: Vec, +} + +impl Environment { + pub fn new() -> Self { + Environment { + aliases: vec![], + bins: vec![], + } + } +} -- cgit v1.2.3