tagger/src/commands/init.rs

14 lines
261 B
Rust

use std::collections::HashMap;
use color_eyre::eyre::Result;
use crate::State;
pub fn init() -> Result<()> {
let state = State {
tags: HashMap::new(),
};
std::fs::write(".state.json", serde_json::to_string_pretty(&state)?)?;
Ok(())
}