Skip to content

Suggestion: Better handling for ctrl-c #138

@xblazegmd

Description

@xblazegmd

Problem

Right now handling for ctrl-c is... not the greatest. Usually when the user presses ctrl-c to exit, the cli panics:

thread 'main' panicked at src/util/logging.rs:64:14:
Error reading line: Interrupted
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Or sometimes it just completely bugs out (for example, in the template selection prompt on geode new, it makes the cursor disappear):
Image
As you can see, the cursor is gone. It should be right after 'a'

Solution

The cli should have better handling for ctrl-c events. For example, maybe add some proper cleanup so my cursor doesn't just disappear off the face of the earth lol. Maybe make it log smth like, idk, "Exiting..." if you want, but that's completely optional.

This can be done with crates like ctrlc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions