Skip to content

Terminal echo is not restored when CLI arguments are -help or "wrong". #22

@skx

Description

@skx

I noticed with the new release that when running "iz-cpm -help" the terminal gets messed up.

$ ./iz-cpm-linux-v1.3.3/iz-cpm -help
iz-cpm https://github.com/ivanizag/iz-cpm
CP/M 2.2 Emulation
Press ctrl-c ctrl-c Y to return to host 

USAGE:
    iz-cpm [FLAGS] [OPTIONS] [ARGS]

...
ARGS:
    <CMD>     The binary image to run, usually a .COM file
    <ARGS>    Parameters for the given command
$

The issue specifically is that terminal echo has been disabled, I have to type "reset" to restore the terminal to the expected state.

Running iz-cpm, with a binary, or with the CCP, is fine. It's only when we terminate early due to either a malformed argument or a -help flag.

For example the following also disables terminal echo

$ ./iz-cpm-linux-v1.3.3/iz-cpm --ccp 
error: The argument '--ccp <ccp>' requires a value but none was supplied

USAGE:
    iz-cpm --ccp <ccp> --cpu <model> --disk-a <path> --terminal <terminal>

For more information try --help
frodo ~/iz-cpm $ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions