summaryrefslogtreecommitdiffstats
path: root/src/compose
diff options
context:
space:
mode:
authorRory Dudley2024-03-30 19:05:23 -0600
committerRory Dudley2024-03-30 19:05:23 -0600
commitd408624afeb0035217d3d327e21b24a62b803f28 (patch)
tree891f52eb69f827ca71de157ab67f51606c7b40f0 /src/compose
parent491d3fbff384d4b04483b54e5bb78d23bb1181c5 (diff)
downloaddwarvish-d408624afeb0035217d3d327e21b24a62b803f28.tar.gz
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.
Diffstat (limited to 'src/compose')
-rw-r--r--src/compose/environment.rs13
1 files changed, 13 insertions, 0 deletions
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<String>,
+ pub bins: Vec<String>,
+}
+
+impl Environment {
+ pub fn new() -> Self {
+ Environment {
+ aliases: vec![],
+ bins: vec![],
+ }
+ }
+}