properly show error message when entering invalid user@host
This commit is contained in:
parent
013e2fab5c
commit
7d5bffce9e
@ -31,6 +31,7 @@ fn main() -> Result<()> {
|
||||
let mut config: ConfigManager = ConfigManager::new(config_root, search_path)?;
|
||||
|
||||
let backend = TermionBackend::new(io::stdout().into_alternate_screen()?);
|
||||
// let backend = TermionBackend::new(io::stdout()); // used for debugging
|
||||
let mut term = Terminal::new(backend)?;
|
||||
|
||||
loop {
|
||||
|
@ -86,7 +86,7 @@ Host {host}
|
||||
let split: Vec<String> = split.map(|a| a.to_string()).collect();
|
||||
|
||||
if split.len() < 2 {
|
||||
bail!("Incorrect user@host given. Example: paul@example.com:34; <user>@<host>[:port]");
|
||||
println!("Incorrect user@host given. Example: paul@example.com:34; <user>@<host>[:port]");
|
||||
} else {
|
||||
break split
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user