From 63dacfec430027b6fb217b7ebc2542cbe90d216c Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 22 Jul 2023 15:28:32 +0100 Subject: factor namespace open/close --- bos-namespaces.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'bos-namespaces.sh') 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 +} -- cgit v1.2.3