Skip to content

Commit

Permalink
refactor: align cli_action to cli to make concept align
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 7, 2021
1 parent 7af5086 commit 84f64b6
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/cli_action/entry_action.rs → src/cli/entry_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use std::path::PathBuf;
use quake_core::parser::quake::QuakeActionNode;
use quake_core::quake_config::QuakeConfig;

use crate::cli_action::helper::table_process;
use crate::exec_wrapper::editor_exec;
use crate::cli::helper::table_process;
use crate::helper::exec_wrapper::editor_exec;
use quake_core::entry::entry_paths::EntryPaths;
use quake_core::errors::QuakeError;
use quake_core::usecases::entry_usecases;
Expand Down Expand Up @@ -74,7 +74,7 @@ mod tests {
use quake_core::parser::quake::QuakeActionNode;
use quake_core::quake_config::QuakeConfig;

use crate::cli_action::action;
use crate::cli::action;

#[test]
fn throw_editor_empty() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/cli_action/quake_action.rs → src/cli/quake_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use walkdir::{DirEntry, FilterEntry, IntoIter, WalkDir};
use quake_core::entry::entry_defines::EntryDefines;
use quake_core::QuakeConfig;

use crate::exec_wrapper::meili_exec;
use crate::helper::exec_wrapper::meili_exec;
use quake_core::entry::entry_paths::EntryPaths;
use quake_core::errors::QuakeError;
use quake_core::usecases::entry_usecases;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/helper/entry_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use quake_core::entry::entry_file::EntryFile;
use quake_core::errors::QuakeError;
use quake_core::helper::file_filter::type_from_md_path;

use crate::exec_wrapper::meili_exec::feed_entry;
use crate::helper::exec_wrapper::meili_exec::feed_entry;

fn async_watcher() -> notify::Result<(RecommendedWatcher, Receiver<notify::Result<Event>>)> {
let (mut tx, rx) = channel(1);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/helper/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pub mod entry_watcher;
pub mod exec_wrapper;
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ use quake_tui::tui_main_loop;

use crate::server::quake_rocket;

pub mod cli_action;
pub mod exec_wrapper;
pub mod cli;
pub mod helper;
pub mod server;

Expand Down Expand Up @@ -88,7 +87,7 @@ pub async fn process_cmd(opts: Opts) -> Result<(), Box<dyn Error>> {
let conf = config_quake(&cmd)?;
if cmd.input.len() > 0 {
let expr = QuakeActionNode::action_from_text(cmd.input.as_str())?;
cli_action::action(expr, conf)?
cli::action(expr, conf)?
}
}
SubCommand::Server(server) => {
Expand Down

0 comments on commit 84f64b6

Please sign in to comment.