//chnage slug of a custom post type
add_filter( 'register_post_type_args', 'comand_register_post_type_args', 10, 2 );
function comand_register_post_type_args( $args, $post_type ) {
if ( 'command' === $post_type ) {
$args['rewrite']['slug'] = 'comand';
}
return $args;
}