mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 11:33:10 +00:00
Remove unused code for global flag
This commit is contained in:
parent
194878915d
commit
f966e6b374
2 changed files with 0 additions and 8 deletions
|
@ -15,7 +15,6 @@ lazy_static! {
|
||||||
fn parse_opts(text: &str) -> Result<FinderOpts, Error> {
|
fn parse_opts(text: &str) -> Result<FinderOpts, Error> {
|
||||||
let mut multi = false;
|
let mut multi = false;
|
||||||
let mut prevent_extra = false;
|
let mut prevent_extra = false;
|
||||||
let mut is_global = false;
|
|
||||||
let mut opts = FinderOpts::default();
|
let mut opts = FinderOpts::default();
|
||||||
|
|
||||||
let parts = shellwords::split(text).map_err(|_| anyhow!("Given options are missing a closing quote"))?;
|
let parts = shellwords::split(text).map_err(|_| anyhow!("Given options are missing a closing quote"))?;
|
||||||
|
@ -33,10 +32,6 @@ fn parse_opts(text: &str) -> Result<FinderOpts, Error> {
|
||||||
prevent_extra = true;
|
prevent_extra = true;
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
"--global" => {
|
|
||||||
is_global = true;
|
|
||||||
false
|
|
||||||
}
|
|
||||||
_ => true,
|
_ => true,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -82,7 +77,6 @@ fn parse_opts(text: &str) -> Result<FinderOpts, Error> {
|
||||||
(false, true) => SuggestionType::SingleSelection,
|
(false, true) => SuggestionType::SingleSelection,
|
||||||
};
|
};
|
||||||
opts.suggestion_type = suggestion_type;
|
opts.suggestion_type = suggestion_type;
|
||||||
opts.global = is_global;
|
|
||||||
|
|
||||||
Ok(opts)
|
Ok(opts)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ pub struct Opts {
|
||||||
pub preview: Option<String>,
|
pub preview: Option<String>,
|
||||||
pub preview_window: Option<String>,
|
pub preview_window: Option<String>,
|
||||||
pub overrides: Option<String>,
|
pub overrides: Option<String>,
|
||||||
pub global: bool,
|
|
||||||
pub header_lines: u8,
|
pub header_lines: u8,
|
||||||
pub header: Option<String>,
|
pub header: Option<String>,
|
||||||
pub suggestion_type: SuggestionType,
|
pub suggestion_type: SuggestionType,
|
||||||
|
@ -22,7 +21,6 @@ impl Default for Opts {
|
||||||
filter: None,
|
filter: None,
|
||||||
preview: None,
|
preview: None,
|
||||||
preview_window: None,
|
preview_window: None,
|
||||||
global: false,
|
|
||||||
overrides: None,
|
overrides: None,
|
||||||
header_lines: 0,
|
header_lines: 0,
|
||||||
header: None,
|
header: None,
|
||||||
|
|
Loading…
Reference in a new issue