--foreach support and switch to argpase
sort keys on output