diff --git a/connectbox-shell/src/commands/pfw.rs b/connectbox-shell/src/commands/pfw.rs index 8c429e3..8d24370 100644 --- a/connectbox-shell/src/commands/pfw.rs +++ b/connectbox-shell/src/commands/pfw.rs @@ -119,10 +119,10 @@ pub(crate) async fn run(cmd: PortForwardsCommand, state: &AppState) -> Result<() } }) .await?; - if !modified { - cprintln!("No port with id {id} exists"); + if modified { + cprintln!("Done!"); } else { - cprintln!("Done!") + cprintln!("No port with id {id} exists"); } } } diff --git a/connectbox-shell/src/main.rs b/connectbox-shell/src/main.rs index 9f23388..9e79a7d 100644 --- a/connectbox-shell/src/main.rs +++ b/connectbox-shell/src/main.rs @@ -2,13 +2,12 @@ use crate::{cli::ShellCommand, utils::QuotableArgs}; use clap::{FromArgMatches, Parser}; use cli::Args; use color_eyre::Result; -use color_print::{cformat, cprintln, cstr}; +use color_print::{cformat, cprintln}; use connectbox::ConnectBox; use rustyline::{ error::ReadlineError, highlight::Highlighter, - history::{DefaultHistory, FileHistory, MemHistory}, - Completer, DefaultEditor, Editor, Helper, Hinter, Validator, + Completer, Editor, Helper, Hinter, Validator, }; use std::borrow::Cow;