如果 shell 函数需要特定的 -e/+e 设置才能工作,是否可以在本地设置该设置,然后在退出该函数之前将其恢复到以前的设置?
myfunction()
{
# Query here if -e is set and remember in a variable?
# Or push the settings to then pop at the end of the function?
set +e
dosomething
doanotherthing
# Restore -e/+e as appropriate, don't just do unconditional set -e
}
Run Code Online (Sandbox Code Playgroud) gnome-keyring 使用什么加密算法?
我试过在他们的网站上寻找它,但它似乎很隐蔽。