Skip to main content

cmd_delete

Function cmd_delete 

Source
pub fn cmd_delete(beans_dir: &Path, id: &str) -> Result<()>
Expand description

Delete a bean and clean up all references to it in other beans’ dependencies.

  1. Load the bean to get its title (for printing)
  2. Delete the bean file
  3. Scan all remaining beans and remove deleted_id from their dependencies
  4. Rebuild the index