diff --git a/CHANGELOG.md b/CHANGELOG.md
index 054f067..187e9fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
- [Changelog](#changelog)
+ - [0.16.0](#0160)
- [0.15.0](#0150)
- [0.14.0](#0140)
- [0.13.0](#0130)
@@ -37,6 +38,12 @@
---
+## 0.16.0
+
+Released on
+
+- [Issue 290](https://github.com/veeso/termscp/issues/290): Password prompt was broken
+
## 0.15.0
Released on 03/10/2024
diff --git a/src/activity_manager.rs b/src/activity_manager.rs
index cf9a7d1..4be4eff 100644
--- a/src/activity_manager.rs
+++ b/src/activity_manager.rs
@@ -111,8 +111,10 @@ impl ActivityManager {
}
/// Prompt user for password to set into params.
- fn prompt_password(&self, params: &mut FileTransferParams) -> Result<(), String> {
- match tty::read_secret_from_tty("Password: ") {
+ fn prompt_password(&mut self, params: &mut FileTransferParams) -> Result<(), String> {
+ let ctx = self.context.as_mut().unwrap();
+
+ match tty::read_secret_from_tty(ctx.terminal(), "Password: ") {
Err(err) => Err(format!("Could not read password: {err}")),
Ok(Some(secret)) => {
debug!(
diff --git a/src/cli_opts.rs b/src/cli_opts.rs
index ddd265c..6fc08ce 100644
--- a/src/cli_opts.rs
+++ b/src/cli_opts.rs
@@ -20,9 +20,11 @@ pub enum Task {
#[derive(FromArgs)]
#[argh(description = "
where positional can be:
- - [address] [local-wrkdir]
+ - [address_a] [address_b] [local-wrkdir]
OR
- - [bookmark-Name] [local-wrkdir]
+ - -b [bookmark-name_1] -b [bookmark-name_2] [local-wrkdir]
+
+ and any combination of the above
Address syntax can be:
diff --git a/src/utils/tty.rs b/src/utils/tty.rs
index a810520..289f992 100644
--- a/src/utils/tty.rs
+++ b/src/utils/tty.rs
@@ -2,11 +2,23 @@
//!
//! `Utils` implements utilities functions to work with layouts
+use tuirealm::terminal::TerminalBridge;
+
/// Read a secret from tty with customisable prompt
-pub fn read_secret_from_tty(prompt: &str) -> std::io::Result