zoxide/src/subcommand/remove.rs

17 lines
280 B
Rust
Raw Normal View History

2020-03-13 00:49:37 +00:00
use crate::util;
2020-03-13 00:49:37 +00:00
use anyhow::Result;
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
#[structopt(about = "Remove a directory")]
pub struct Remove {
path: String,
}
impl Remove {
2020-03-27 19:08:36 +00:00
pub fn run(&self) -> Result<()> {
util::get_db()?.remove(&self.path)
2020-03-13 00:49:37 +00:00
}
}