summaryrefslogtreecommitdiffhomepage
path: root/subr/rtl_list.subr
diff options
context:
space:
mode:
Diffstat (limited to 'subr/rtl_list.subr')
-rw-r--r--subr/rtl_list.subr5
1 files changed, 5 insertions, 0 deletions
diff --git a/subr/rtl_list.subr b/subr/rtl_list.subr
index 479b0fd4..f57a3ee9 100644
--- a/subr/rtl_list.subr
+++ b/subr/rtl_list.subr
@@ -65,6 +65,11 @@ rtl_lsearch() {
echo "${_lnew}";
};
+rtl_lsort() {
+ local _list="${1}" _sep="${2:- }";
+ printf "%s" "${_list}" | tr "${_sep}" "\n" | sort | paste -s -d "${_sep}";
+};
+
rtl_lunfold_depends() {
local _vname_template="${1}" _depends="" _name="" _names=""; shift;
for _name in "${@}"; do