Merge in changes from main and fix a clippy lint

This commit is contained in:
Brooks J Rady 2021-01-07 16:21:38 +00:00
commit 70e16f80b1
26 changed files with 307 additions and 151 deletions

View File

@ -33,5 +33,8 @@ features = ["unstable"]
[dev-dependencies]
insta = "0.16.1"
[build-dependencies]
structopt = "0.3"
[profile.release]
lto = true
lto = true

View File

@ -1,6 +1,6 @@
<h1 align="center">
<br>
<img src="logo.png" alt="logo" width="200">
<img src="assets/logo.png" alt="logo" width="200">
<br>
Mosaic
<br>
@ -8,7 +8,7 @@
</h1>
<p align="center">
<img src="demo.gif" alt="demo">
<img src="assets/demo.gif" alt="demo">
</p>
<p align="center">

View File

@ -0,0 +1,45 @@
#compdef mosaic
autoload -U is-at-least
_mosaic() {
typeset -A opt_args
typeset -a _arguments_options
local ret=1
if is-at-least 5.2; then
_arguments_options=(-s -S -C)
else
_arguments_options=(-s -C)
fi
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'-s+[Send "split (direction h == horizontal / v == vertical)" to active mosaic session]' \
'--split=[Send "split (direction h == horizontal / v == vertical)" to active mosaic session]' \
'-o+[Send "open file in new pane" to active mosaic session]' \
'--open-file=[Send "open file in new pane" to active mosaic session]' \
'--max-panes=[Maximum panes on screen, caution: opening more panes will close old ones]' \
'-l+[Path to a layout yaml file]' \
'--layout=[Path to a layout yaml file]' \
'-m[Send "move focused pane" to active mosaic session]' \
'--move-focus[Send "move focused pane" to active mosaic session]' \
'-d[]' \
'--debug[]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
}
(( $+functions[_mosaic_commands] )) ||
_mosaic_commands() {
local commands; commands=(
)
_describe -t commands 'mosaic commands' commands "$@"
}
_mosaic "$@"

View File

@ -0,0 +1,69 @@
_mosaic() {
local i cur prev opts cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd=""
opts=""
for i in ${COMP_WORDS[@]}
do
case "${i}" in
mosaic)
cmd="mosaic"
;;
*)
;;
esac
done
case "${cmd}" in
mosaic)
opts=" -m -d -h -V -s -o -l --move-focus --debug --help --version --split --open-file --max-panes --layout "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--split)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-s)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--open-file)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-o)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--max-panes)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--layout)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-l)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
esac
}
complete -F _mosaic -o bashdefault -o default mosaic

View File

@ -0,0 +1,8 @@
complete -c mosaic -n "__fish_use_subcommand" -s s -l split -d 'Send "split (direction h == horizontal / v == vertical)" to active mosaic session'
complete -c mosaic -n "__fish_use_subcommand" -s o -l open-file -d 'Send "open file in new pane" to active mosaic session'
complete -c mosaic -n "__fish_use_subcommand" -l max-panes -d 'Maximum panes on screen, caution: opening more panes will close old ones'
complete -c mosaic -n "__fish_use_subcommand" -s l -l layout -d 'Path to a layout yaml file'
complete -c mosaic -n "__fish_use_subcommand" -s m -l move-focus -d 'Send "move focused pane" to active mosaic session'
complete -c mosaic -n "__fish_use_subcommand" -s d -l debug
complete -c mosaic -n "__fish_use_subcommand" -s h -l help -d 'Prints help information'
complete -c mosaic -n "__fish_use_subcommand" -s V -l version -d 'Prints version information'

View File

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 213 KiB

22
build.rs Normal file
View File

@ -0,0 +1,22 @@
use std::fs;
use structopt::clap::Shell;
include!("src/cli.rs");
const BIN_NAME: &str = "mosaic";
fn main() {
let mut clap_app = CliArgs::clap();
println!("cargo:rerun-if-changed=src/app.rs");
let mut out_dir = std::env::var_os("CARGO_MANIFEST_DIR").unwrap();
out_dir.push("/assets/completions");
println!(
"Completion files will to added to this location: {:?}",
out_dir
);
fs::create_dir_all(&out_dir).unwrap();
clap_app.gen_completions(BIN_NAME, Shell::Bash, &out_dir);
clap_app.gen_completions(BIN_NAME, Shell::Zsh, &out_dir);
clap_app.gen_completions(BIN_NAME, Shell::Fish, &out_dir);
}

Binary file not shown.

29
src/cli.rs Normal file
View File

@ -0,0 +1,29 @@
use std::path::PathBuf;
use structopt::StructOpt;
#[derive(StructOpt, Debug, Default)]
#[structopt(name = "mosaic")]
pub struct CliArgs {
/// Send "split (direction h == horizontal / v == vertical)" to active mosaic session
#[structopt(short, long)]
pub split: Option<char>,
/// Send "move focused pane" to active mosaic session
#[structopt(short, long)]
pub move_focus: bool,
/// Send "open file in new pane" to active mosaic session
#[structopt(short, long)]
pub open_file: Option<PathBuf>,
/// Maximum panes on screen, caution: opening more panes will close old ones
#[structopt(long)]
pub max_panes: Option<usize>,
/// Path to a layout yaml file
#[structopt(short, long)]
pub layout: Option<PathBuf>,
#[structopt(short, long)]
pub debug: bool,
}

View File

@ -2,6 +2,7 @@
mod tests;
mod boundaries;
mod cli;
mod command_is_executing;
mod errors;
mod input;
@ -31,6 +32,7 @@ use wasm_vm::PluginEnv;
use wasmer::{ChainableNamedResolver, Instance, Module, Store, Value};
use wasmer_wasi::{Pipe, WasiState};
use crate::cli::CliArgs;
use crate::command_is_executing::CommandIsExecuting;
use crate::errors::{
AppContext, ContextType, ErrorContext, PluginContext, PtyContext, ScreenContext,
@ -91,30 +93,8 @@ impl<T: Clone> SenderWithContext<T> {
unsafe impl<T: Clone> Send for SenderWithContext<T> {}
unsafe impl<T: Clone> Sync for SenderWithContext<T> {}
#[derive(StructOpt, Debug, Default)]
#[structopt(name = "mosaic")]
pub struct Opt {
#[structopt(short, long)]
/// Send "split (direction h == horizontal / v == vertical)" to active mosaic session
split: Option<char>,
#[structopt(short, long)]
/// Send "move focused pane" to active mosaic session
move_focus: bool,
#[structopt(short, long)]
/// Send "open file in new pane" to active mosaic session
open_file: Option<PathBuf>,
#[structopt(long)]
/// Maximum panes on screen, caution: opening more panes will close old ones
max_panes: Option<usize>,
#[structopt(short, long)]
/// Path to a layout yaml file
layout: Option<PathBuf>,
#[structopt(short, long)]
debug: bool,
}
pub fn main() {
let opts = Opt::from_args();
let opts = CliArgs::from_args();
if let Some(split_dir) = opts.split {
match split_dir {
'h' => {
@ -151,7 +131,7 @@ pub enum AppInstruction {
Error(String),
}
pub fn start(mut os_input: Box<dyn OsApi>, opts: Opt) {
pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs) {
let mut active_threads = vec![];
let command_is_executing = CommandIsExecuting::new();

View File

@ -7,7 +7,7 @@ use crate::tests::utils::commands::{
SPAWN_TERMINAL, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY, TOGGLE_ACTIVE_TERMINAL_FULLSCREEN,
};
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
FakeInputOutput::new(fake_win_size.clone())
@ -23,7 +23,7 @@ pub fn starts_with_one_terminal() {
};
let mut fake_input_output = get_fake_os_input(&fake_win_size);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -50,7 +50,7 @@ pub fn split_terminals_vertically() {
&SPLIT_VERTICALLY,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -77,7 +77,7 @@ pub fn split_terminals_horizontally() {
&SPLIT_HORIZONTALLY,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -107,7 +107,7 @@ pub fn split_largest_terminal() {
&SPAWN_TERMINAL,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -158,7 +158,7 @@ pub fn resize_right_and_up_on_the_same_axis() {
&RESIZE_UP,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -190,7 +190,7 @@ pub fn scrolling_inside_a_pane() {
&SCROLL_DOWN,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -222,7 +222,7 @@ pub fn max_panes() {
&SPAWN_TERMINAL,
&QUIT,
]);
let mut opts = Opt::default();
let mut opts = CliArgs::default();
opts.max_panes = Some(4);
start(Box::new(fake_input_output.clone()), opts);
let output_frames = fake_input_output
@ -264,7 +264,7 @@ pub fn toggle_focused_pane_fullscreen() {
&TOGGLE_ACTIVE_TERMINAL_FULLSCREEN,
&QUIT,
]);
let mut opts = Opt::default();
let mut opts = CliArgs::default();
opts.max_panes = Some(4);
start(Box::new(fake_input_output.clone()), opts);
let output_frames = fake_input_output

View File

@ -3,7 +3,7 @@ use ::insta::assert_snapshot;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
CLOSE_FOCUSED_PANE, COMMAND_TOGGLE, MOVE_FOCUS, QUIT, RESIZE_DOWN, RESIZE_LEFT, RESIZE_UP,
@ -38,7 +38,7 @@ pub fn close_pane_with_another_pane_above_it() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -76,7 +76,7 @@ pub fn close_pane_with_another_pane_below_it() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -111,7 +111,7 @@ pub fn close_pane_with_another_pane_to_the_left() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -147,7 +147,7 @@ pub fn close_pane_with_another_pane_to_the_right() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -188,7 +188,7 @@ pub fn close_pane_with_multiple_panes_above_it() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -227,7 +227,7 @@ pub fn close_pane_with_multiple_panes_below_it() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -268,7 +268,7 @@ pub fn close_pane_with_multiple_panes_to_the_left() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -307,7 +307,7 @@ pub fn close_pane_with_multiple_panes_to_the_right() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -360,7 +360,7 @@ pub fn close_pane_with_multiple_panes_above_it_away_from_screen_edges() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -413,7 +413,7 @@ pub fn close_pane_with_multiple_panes_below_it_away_from_screen_edges() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -468,7 +468,7 @@ pub fn close_pane_with_multiple_panes_to_the_left_away_from_screen_edges() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -523,7 +523,7 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -555,7 +555,7 @@ pub fn closing_last_pane_exits_app() {
&CLOSE_FOCUSED_PANE,
&CLOSE_FOCUSED_PANE,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -5,7 +5,7 @@ use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::possible_tty_inputs::Bytes;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{COMMAND_TOGGLE, QUIT};
@ -40,7 +40,7 @@ pub fn run_bandwhich_from_fish_shell() {
let fixture_name = "fish_and_bandwhich";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -63,7 +63,7 @@ pub fn fish_tab_completion_options() {
let fixture_name = "fish_tab_completion_options";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -91,7 +91,7 @@ pub fn fish_select_tab_completion_options() {
let fixture_name = "fish_select_tab_completion_options";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -123,7 +123,7 @@ pub fn vim_scroll_region_down() {
let fixture_name = "vim_scroll_region_down";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]); // quit (ctrl-q)
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -152,7 +152,7 @@ pub fn vim_ctrl_d() {
let fixture_name = "vim_ctrl_d";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -180,7 +180,7 @@ pub fn vim_ctrl_u() {
let fixture_name = "vim_ctrl_u";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -203,7 +203,7 @@ pub fn htop() {
let fixture_name = "htop";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -226,7 +226,7 @@ pub fn htop_scrolling() {
let fixture_name = "htop_scrolling";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -249,7 +249,7 @@ pub fn htop_right_scrolling() {
let fixture_name = "htop_right_scrolling";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -280,7 +280,7 @@ pub fn vim_overwrite() {
let fixture_name = "vim_overwrite";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -306,7 +306,7 @@ pub fn clear_scroll_region() {
let fixture_name = "clear_scroll_region";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -329,7 +329,7 @@ pub fn display_tab_characters_properly() {
let fixture_name = "tab_characters";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -352,7 +352,7 @@ pub fn neovim_insert_mode() {
let fixture_name = "nvim_insert";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -377,7 +377,7 @@ pub fn bash_cursor_linewrap() {
let fixture_name = "bash_cursor_linewrap";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -402,7 +402,7 @@ pub fn fish_paste_multiline() {
let fixture_name = "fish_paste_multiline";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -425,7 +425,7 @@ pub fn git_log() {
let fixture_name = "git_log";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -450,7 +450,7 @@ pub fn git_diff_scrollup() {
let fixture_name = "git_diff_scrollup";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames
@ -473,7 +473,7 @@ pub fn emacs_longbuf() {
let fixture_name = "emacs_longbuf_tutorial";
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
.output_frames

View File

@ -5,7 +5,7 @@ use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::commands::{COMMAND_TOGGLE, QUIT};
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
FakeInputOutput::new(fake_win_size.clone())
@ -21,7 +21,7 @@ pub fn accepts_basic_layout() {
};
let mut fake_input_output = get_fake_os_input(&fake_win_size);
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
let mut opts = Opt::default();
let mut opts = CliArgs::default();
opts.layout = Some(PathBuf::from(
"src/tests/fixtures/layouts/three-panes-with-nesting.yaml",
));
@ -63,7 +63,7 @@ pub fn should_throw_for_more_than_100_percent_total() {
let mut fake_input_output = get_fake_os_input(&fake_win_size);
fake_input_output.add_terminal_input(&[&QUIT]);
let mut opts = Opt::default();
let mut opts = CliArgs::default();
opts.layout = Some(PathBuf::from(
"src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml",
));
@ -83,7 +83,7 @@ pub fn should_throw_for_less_than_100_percent_total() {
let mut fake_input_output = get_fake_os_input(&fake_win_size);
fake_input_output.add_terminal_input(&[&QUIT]);
let mut opts = Opt::default();
let mut opts = CliArgs::default();
opts.layout = Some(PathBuf::from(
"src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml",
));

View File

@ -3,7 +3,7 @@ use ::insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
COMMAND_TOGGLE, MOVE_FOCUS_DOWN, MOVE_FOCUS_UP, QUIT, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY,
@ -30,7 +30,7 @@ pub fn move_focus_down() {
&MOVE_FOCUS_DOWN,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -62,7 +62,7 @@ pub fn move_focus_down_to_the_largest_overlap() {
&MOVE_FOCUS_DOWN,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -3,7 +3,7 @@ use ::insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
COMMAND_TOGGLE, MOVE_FOCUS_LEFT, MOVE_FOCUS_RIGHT, QUIT, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY,
@ -29,7 +29,7 @@ pub fn move_focus_left() {
&MOVE_FOCUS_LEFT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -62,7 +62,7 @@ pub fn move_focus_left_to_the_largest_overlap() {
&MOVE_FOCUS_LEFT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -3,7 +3,7 @@ use ::insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
COMMAND_TOGGLE, MOVE_FOCUS_LEFT, MOVE_FOCUS_RIGHT, QUIT, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY,
@ -30,7 +30,7 @@ pub fn move_focus_right() {
&MOVE_FOCUS_RIGHT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -62,7 +62,7 @@ pub fn move_focus_right_to_the_largest_overlap() {
&MOVE_FOCUS_RIGHT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -3,7 +3,7 @@ use ::insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
COMMAND_TOGGLE, MOVE_FOCUS_DOWN, MOVE_FOCUS_UP, QUIT, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY,
@ -29,7 +29,7 @@ pub fn move_focus_up() {
&MOVE_FOCUS_UP,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -62,7 +62,7 @@ pub fn move_focus_up_to_the_largest_overlap() {
&MOVE_FOCUS_UP,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -3,7 +3,7 @@ use insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
COMMAND_TOGGLE, MOVE_FOCUS, QUIT, RESIZE_DOWN, RESIZE_LEFT, SPLIT_HORIZONTALLY,
@ -39,7 +39,7 @@ pub fn resize_down_with_pane_above() {
&RESIZE_DOWN,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -77,7 +77,7 @@ pub fn resize_down_with_pane_below() {
&RESIZE_DOWN,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -120,7 +120,7 @@ pub fn resize_down_with_panes_above_and_below() {
&RESIZE_DOWN,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -163,7 +163,7 @@ pub fn resize_down_with_multiple_panes_above() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -208,7 +208,7 @@ pub fn resize_down_with_panes_above_aligned_left_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -252,7 +252,7 @@ pub fn resize_down_with_panes_below_aligned_left_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -294,7 +294,7 @@ pub fn resize_down_with_panes_above_aligned_right_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -337,7 +337,7 @@ pub fn resize_down_with_panes_below_aligned_right_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -383,7 +383,7 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -431,7 +431,7 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -494,7 +494,7 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_panes_to_the_lef
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -559,7 +559,7 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_to_the_left_and_
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -3,7 +3,7 @@ use ::insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
COMMAND_TOGGLE, MOVE_FOCUS, QUIT, RESIZE_LEFT, RESIZE_UP, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY,
@ -35,7 +35,7 @@ pub fn resize_left_with_pane_to_the_left() {
&RESIZE_LEFT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -71,7 +71,7 @@ pub fn resize_left_with_pane_to_the_right() {
&RESIZE_LEFT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -109,7 +109,7 @@ pub fn resize_left_with_panes_to_the_left_and_right() {
&RESIZE_LEFT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -150,7 +150,7 @@ pub fn resize_left_with_multiple_panes_to_the_left() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -193,7 +193,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -233,7 +233,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -275,7 +275,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_bottom_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -316,7 +316,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_bottom_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -362,7 +362,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_current_pa
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -410,7 +410,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_current_p
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -473,7 +473,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abov
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -539,7 +539,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_panes_abo
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -3,7 +3,7 @@ use ::insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
COMMAND_TOGGLE, MOVE_FOCUS, QUIT, RESIZE_RIGHT, RESIZE_UP, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY,
@ -35,7 +35,7 @@ pub fn resize_right_with_pane_to_the_left() {
&RESIZE_RIGHT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -71,7 +71,7 @@ pub fn resize_right_with_pane_to_the_right() {
&RESIZE_RIGHT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -109,7 +109,7 @@ pub fn resize_right_with_panes_to_the_left_and_right() {
&RESIZE_RIGHT,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -150,7 +150,7 @@ pub fn resize_right_with_multiple_panes_to_the_left() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -193,7 +193,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -233,7 +233,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -275,7 +275,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_bottom_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -316,7 +316,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_bottom_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -362,7 +362,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_current_p
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -410,7 +410,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_current_
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -473,7 +473,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abo
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -538,7 +538,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_panes_ab
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -3,7 +3,7 @@ use ::insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
COMMAND_TOGGLE, MOVE_FOCUS, QUIT, RESIZE_LEFT, RESIZE_UP, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY,
@ -37,7 +37,7 @@ pub fn resize_up_with_pane_above() {
&RESIZE_UP,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -75,7 +75,7 @@ pub fn resize_up_with_pane_below() {
&RESIZE_UP,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -118,7 +118,7 @@ pub fn resize_up_with_panes_above_and_below() {
&RESIZE_UP,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -160,7 +160,7 @@ pub fn resize_up_with_multiple_panes_above() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -203,7 +203,7 @@ pub fn resize_up_with_panes_above_aligned_left_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -247,7 +247,7 @@ pub fn resize_up_with_panes_below_aligned_left_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -289,7 +289,7 @@ pub fn resize_up_with_panes_above_aligned_right_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -332,7 +332,7 @@ pub fn resize_up_with_panes_below_aligned_right_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -378,7 +378,7 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -426,7 +426,7 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_current_pane() {
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -489,7 +489,7 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_panes_to_the_left_
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -554,7 +554,7 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_to_the_left_and_ri
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -1,9 +1,9 @@
use ::insta::assert_snapshot;
use insta::assert_snapshot;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{panes::PositionAndSize, tests::utils::commands::CLOSE_FOCUSED_PANE};
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
CLOSE_TAB, COMMAND_TOGGLE, NEW_TAB, QUIT, SPLIT_HORIZONTALLY, SWITCH_NEXT_TAB, SWITCH_PREV_TAB,
@ -30,7 +30,7 @@ pub fn open_new_tab() {
&NEW_TAB,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -60,7 +60,7 @@ pub fn switch_to_prev_tab() {
&SWITCH_PREV_TAB,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -90,7 +90,7 @@ pub fn switch_to_next_tab() {
&SWITCH_NEXT_TAB,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -119,7 +119,7 @@ pub fn close_tab() {
&CLOSE_TAB,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -151,7 +151,7 @@ pub fn close_last_pane_in_a_tab() {
&CLOSE_TAB,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -185,7 +185,7 @@ pub fn close_the_middle_tab() {
&SWITCH_NEXT_TAB,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -220,7 +220,7 @@ pub fn close_the_tab_that_has_a_pane_in_fullscreen() {
&SWITCH_NEXT_TAB,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -249,7 +249,7 @@ pub fn closing_last_tab_exits_the_app() {
&CLOSE_TAB,
&CLOSE_TAB,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer

View File

@ -1,9 +1,9 @@
use ::insta::assert_snapshot;
use insta::assert_snapshot;
use crate::panes::PositionAndSize;
use crate::tests::fakes::FakeInputOutput;
use crate::tests::utils::get_output_frame_snapshots;
use crate::{start, Opt};
use crate::{start, CliArgs};
use crate::tests::utils::commands::{
CLOSE_FOCUSED_PANE, COMMAND_TOGGLE, MOVE_FOCUS, QUIT, SPLIT_HORIZONTALLY, SPLIT_VERTICALLY,
@ -32,7 +32,7 @@ pub fn adding_new_terminal_in_fullscreen() {
&CLOSE_FOCUSED_PANE,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer
@ -63,7 +63,7 @@ pub fn move_focus_is_disabled_in_fullscreen() {
&TOGGLE_ACTIVE_TERMINAL_FULLSCREEN,
&QUIT,
]);
start(Box::new(fake_input_output.clone()), Opt::default());
start(Box::new(fake_input_output.clone()), CliArgs::default());
let output_frames = fake_input_output
.stdout_writer