git-identity/TODO.md

39 lines
1.2 KiB
Markdown

# Subcommands
## import
Import an identity from a gpg key.
We still need to save it somewhere
## use
Set the identity of the current git repo
Relevant crates:
```Cargo.toml
# For writing to the local git config as well as to allow configuring git-identity from git
git2 = { version = "0.20.3", default-features = false }
```
## show
Show a saved identity or the identity that's currently effective
## delete
Remove a saved identity
## list
List all saved identities
## edit
Interactively edit a saved identity (or in a text editor when using a specific flag)
# User input
Currently, dialoguer (which uses the console crate) doesn't reset the terminal state properly when
the user exists using ctrl-c. Most importantly, the cursor remains hidden even after the program
exited.
Maybe switching to [inquire](https://docs.rs/inquire/latest/inquire/) would fix this. If not, we
might need to check if console emits `std::io::ErrorKind::Interrupted` like it seems to me it does
and whether or not we can react to it easily.
# Completions
clap_complete does that statically. It will be able to do it dynamically once the
[Rust-Native Completion Engine (#3166)](https://github.com/clap-rs/clap/issues/3166) feature lands