Merge branch 'custom-command-expand-empty' into release-3.11

Merge-request: !2074