summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Isidoro <denisidoro@users.noreply.github.com>2023-04-08 21:13:27 -0300
committerGitHub <noreply@github.com>2023-04-08 21:13:27 -0300
commitf6414551bb94f67e332f7885ac307754e4afdb61 (patch)
tree3921abe94892cdfcb451524dc190d1b0b95e568d /src
parent8963749e6aea4ee03589e9ed4967d841f0856971 (diff)
Prevent variable selection content from being limited to 3 columns (#821)
Diffstat (limited to 'src')
-rw-r--r--src/commands/core/actor.rs1
-rw-r--r--src/finder/mod.rs6
-rw-r--r--src/finder/structures.rs2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/commands/core/actor.rs b/src/commands/core/actor.rs
index f356273..62bda25 100644
--- a/src/commands/core/actor.rs
+++ b/src/commands/core/actor.rs
@@ -101,6 +101,7 @@ fn prompt_finder(
let mut opts = FinderOpts {
preview: Some(preview),
+ show_all_columns: true,
..initial_opts.clone().unwrap_or_else(FinderOpts::var_default)
};
diff --git a/src/finder/mod.rs b/src/finder/mod.rs
index f0efa5b..ba33b41 100644
--- a/src/finder/mod.rs
+++ b/src/finder/mod.rs
@@ -75,8 +75,6 @@ impl FinderChoice {
"",
"--preview-window",
format!("up:{}:nohidden", preview_height).as_str(),
- "--with-nth",
- "1,2,3",
"--delimiter",
deser::terminal::DELIMITER.to_string().as_str(),
"--ansi",
@@ -85,6 +83,10 @@ impl FinderChoice {
"--exact",
]);
+ if !opts.show_all_columns {
+ command.args(["--with-nth", "1,2,3"]);
+ }
+
if !opts.prevent_select1 {
if let Self::Fzf = self {
command.arg("--select-1");
diff --git a/src/finder/structures.rs b/src/finder/structures.rs
index e0581ea..a055194 100644
--- a/src/finder/structures.rs
+++ b/src/finder/structures.rs
@@ -16,6 +16,7 @@ pub struct Opts {
pub column: Option<u8>,
pub map: Option<String>,
pub prevent_select1: bool,
+ pub show_all_columns: bool,
}
impl Default for Opts {
@@ -34,6 +35,7 @@ impl Default for Opts {
delimiter: None,
map: None,
prevent_select1: true,
+ show_all_columns: false,
}
}
}