timetrack works locally
This commit is contained in:
@@ -22,10 +22,10 @@ pub struct TimeTrack {
|
||||
mize: Mize,
|
||||
}
|
||||
|
||||
pub fn timetrack(mize: &mut Mize) -> MizeResult<()> {
|
||||
pub fn part_timetrack(mize: &mut Mize) -> MizeResult<()> {
|
||||
#[cfg(feature = "target-os")] {
|
||||
let mut cli = mize.get_part_native::<crate::CliPart>("cli")?;
|
||||
cli.set_command("ppc");
|
||||
cli.set_command("sci");
|
||||
|
||||
cli.subcommand(
|
||||
Command::new("editActionList").alias("aal").arg(
|
||||
@@ -271,7 +271,7 @@ fn command_edit_action_list(matches: &ArgMatches, mut mize: Mize) -> MizeResult<
|
||||
.map_err(|e| mize_err!("Failed to write temp file: {}", e))?;
|
||||
|
||||
// open $EDITOR blocking
|
||||
crate::cli_spawn(format!("nvim {}", tmp_file.display()))?;
|
||||
crate::cli_spawn(&mut mize, format!("nvim {}", tmp_file.display()))?;
|
||||
|
||||
// read file and update db
|
||||
let new_file_content = std::fs::read_to_string(&tmp_file)
|
||||
@@ -381,7 +381,7 @@ fn command_edit_activities(_: &ArgMatches, mut mize: Mize) -> MizeResult<()> {
|
||||
|
||||
loop {
|
||||
// open $EDITOR blocking
|
||||
crate::cli_spawn(format!("nvim {}", tmp_file.display()))?;
|
||||
crate::cli_spawn(&mut mize, format!("nvim {}", tmp_file.display()))?;
|
||||
|
||||
let new_file_content = std::fs::read_to_string(&tmp_file)
|
||||
.map_err(|e| mize_err!("Failed to read temp file: {}", e))?;
|
||||
|
||||
Reference in New Issue
Block a user