pash
pash copied to clipboard
r_split needs exported functions
As @tammam1998 informed me, there is a bug when using --r_split
flag in pash and calling functions.
Reproduce:
extract_text()
{
:
}
extract_tex()
{
:
}
test1()
{
:
}
# this fails
echo 'test' |
extract_text
# this doesn't fail
echo 'test' |
extract_tex
# this doesn't fail
extract_text
# this doesn't fail
echo 'test1' |
test1
Adding export -f extract_text
seems to solve the issue. However, I do not understand why the other function calls seem to pass.
Tested on deathstar and my local machine.
This is an issue with how r_split
works, and it is low priority since exporting the functions does the trick.
This is not really a bug, so closing with wontfix.