begin guess_by_command

Signed-off-by: Mattias Andrée <maandree@operamail.com>
implement guess_by_command

Signed-off-by: Mattias Andrée <maandree@operamail.com>