Ajout : comportement par défaut si aucun argument n'est passé dans

qemush
This commit is contained in:
Hippolyte Chauvin 2023-10-15 13:53:11 +02:00
parent a0c2e2cf43
commit e1f4d4350b

View file

@ -90,7 +90,9 @@ public_rm() {
function="$1"
shift
if declare -F | cut -d \ -f 3- | grep '^public_' | sed 's/^public_//' | grep -q "^${function}$"; then
if [ -z "$function" ]; then
public_active
elif declare -F | cut -d \ -f 3- | grep '^public_' | sed 's/^public_//' | grep -q "^${function}$"; then
"public_${function}" "$@"
else
error_usage