summaryrefslogtreecommitdiff
path: root/bos-namespaces.sh
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2023-07-22 15:28:32 +0100
committerdakkar <dakkar@thenautilus.net>2023-07-22 15:28:32 +0100
commit63dacfec430027b6fb217b7ebc2542cbe90d216c (patch)
tree3b0d4a97f1df24273aa333eac101260716353c10 /bos-namespaces.sh
parentfix block&namespace nesting (diff)
downloadbash-object-system-63dacfec430027b6fb217b7ebc2542cbe90d216c.tar.gz
bash-object-system-63dacfec430027b6fb217b7ebc2542cbe90d216c.tar.bz2
bash-object-system-63dacfec430027b6fb217b7ebc2542cbe90d216c.zip
factor namespace open/close
Diffstat (limited to 'bos-namespaces.sh')
-rw-r--r--bos-namespaces.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/bos-namespaces.sh b/bos-namespaces.sh
index 02f3df2..d36b87e 100644
--- a/bos-namespaces.sh
+++ b/bos-namespaces.sh
@@ -112,3 +112,19 @@ function bos-namespaces/qualify-funcs() {
return 0
}
+
+function bos-namespaces/namespace-open() {
+ bos-namespaces/push "$1"
+ bos-namespaces/save-funcs
+
+ return 0
+}
+
+function bos-namespaces/namespace-close() {
+ local -a methods_list; bos-namespaces/list-new-funcs-into methods_list
+ bos-namespaces/qualify-funcs "${methods_list[@]}"
+
+ bos-namespaces/pop
+
+ return 0
+}