Skip to content

Commit

Permalink
Fix navi fn welcome (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
denisidoro committed Apr 22, 2021
1 parent 26ec4bf commit baa477c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/welcome.rs
@@ -1,7 +1,8 @@
use crate::actor;
use crate::config::CONFIG;
use crate::extractor;
use crate::finder::structures::Opts as FinderOpts;
use crate::finder::Finder;

use crate::structures::cheat::VariableMap;
use crate::structures::item::Item;
use crate::writer;
Expand All @@ -12,13 +13,21 @@ use std::io::Write;
pub fn main() -> Result<()> {
let config = &CONFIG;
let opts = FinderOpts::from_config(&config)?;
let _ = config
let (raw_selection, variables, files) = config
.finder()
.call(opts, |stdin, _| {
populate_cheatsheet(stdin);
Ok(Some(VariableMap::new()))
})
.context("Failed getting selection and variables from finder")?;

let extractions = extractor::extract_from_selections(&raw_selection, config.best_match());

if extractions.is_err() {
return main();
}

actor::act(extractions, files, variables)?;
Ok(())
}

Expand Down

0 comments on commit baa477c

Please sign in to comment.