Fix picker scrolling and SSH host-key prompt
This commit is contained in:
parent
48824dc681
commit
d58847effa
2 changed files with 7 additions and 2 deletions
|
|
@ -52,7 +52,11 @@ impl SshSession {
|
||||||
|
|
||||||
fn base_cmd(&self) -> Command {
|
fn base_cmd(&self) -> Command {
|
||||||
let mut cmd = Command::new(&self.command);
|
let mut cmd = Command::new(&self.command);
|
||||||
|
// Non-interactive mode: do not prompt for host keys or passwords.
|
||||||
|
cmd.arg("-o").arg("BatchMode=yes");
|
||||||
|
cmd.arg("-o").arg("StrictHostKeyChecking=accept-new");
|
||||||
cmd.args(&self.target.args);
|
cmd.args(&self.target.args);
|
||||||
|
cmd.stdin(Stdio::null());
|
||||||
cmd
|
cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use ratatui::{
|
||||||
layout::{Alignment, Constraint, Direction, Layout, Margin},
|
layout::{Alignment, Constraint, Direction, Layout, Margin},
|
||||||
style::{Color, Modifier, Style},
|
style::{Color, Modifier, Style},
|
||||||
text::{Line, Span, Text},
|
text::{Line, Span, Text},
|
||||||
widgets::{Block, Borders, Clear, List, ListItem, Paragraph, Wrap},
|
widgets::{Block, Borders, Clear, List, ListItem, ListState, Paragraph, Wrap},
|
||||||
Frame,
|
Frame,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -81,7 +81,8 @@ fn draw_log_list(f: &mut Frame, app: &App, area: ratatui::layout::Rect) {
|
||||||
|
|
||||||
let title = format!(" Logs ({}/{}) ", app.filtered_indices.len(), app.logs.len());
|
let title = format!(" Logs ({}/{}) ", app.filtered_indices.len(), app.logs.len());
|
||||||
let list = List::new(items).block(default_block(&title));
|
let list = List::new(items).block(default_block(&title));
|
||||||
f.render_widget(list, area);
|
let mut state = ListState::default().with_selected(Some(app.selected_index));
|
||||||
|
f.render_stateful_widget(list, area, &mut state);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn draw_preview(f: &mut Frame, app: &App, area: ratatui::layout::Rect) {
|
fn draw_preview(f: &mut Frame, app: &App, area: ratatui::layout::Rect) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue