Cmd: port aliases-related commands to C++