From where to source a file description of bash functions to import them globally or at least for any kde user session

Hello.

I am using leap 15.5 with KDE (plasma 5.103) and X11

I have a file which contain description of bash functions.
Here an example what this file contains :

# ++++++++++++++++++++++++++++++++++++++++++++
#
# abort_because_test
#
# ++++++++++++++++++++++++++++++++++++++++++++
#
abort_because_test () {

#
	local L_LINENO=" "
	local L_MESG=" "

	if [[ $# -gt 0 ]] ; then
		L_LINENO="$1"
		if [[ $# -gt 1 ]] ; then
			L_MESG="$2"
		fi
	fi
#

    echo
    printf  "%s\n" "${MY_LIGHT_PURPLE}! # ! # ! # ! # ! # ! # ! # ! # ! # !"
    printf  "%s\n" "!"
    printf  "%s\n" "!   LINENO : $L_LINENO"
    printf  "%s\n" "!"
    printf  "%s\n" "!   MESG   : $L_MESG"
    printf  "%s\n" "!"
    printf  "%s\n" "!   ABORT BECAUSE TEST"
    printf  "%s\n" "!"
    printf  "%s\n" "! # ! # ! # ! # ! # ! # ! # ! # ! # !${NOCOLOR}"
    echo
#
	exit ${E_TEST_ABORT:-251}

}

export -f abort_because_test

Initially this file definition was sourced in /etc/profile.local.
A few times ago and Up to leap 15.4, this file was stored in /etc/profile.d.
From 15.5 it is no more possible.
I got a syntax error ( functions name ended with a ‘%%’ ).

I have tried to put the file definition in $HOME/.config/plasma-workspace/env without success.

I have made tests without problems with kde on fedora, ubuntu.

Any help is welcome.

These days scripts there are run very early by dash, and fail silently, especially on bashisms, such as export -f.

On my desktop, Kubuntu (thus likely a debian thing), scripts in /etc/profile.d are only sourced because /etc/profile has code to do so, and they have to be .sh. It also sources /etc/bash.bashrc, which looks like a good place for system-wide bash specific stuff. And /etc/profile is only run by login shells.

Thank you.
I know it worked as expected on fedora, ubuntu, gnome because i made test.
It is specific to opensuse but I need a workaround.

Perhaps KDE has its own initialisation piece of code for x11.