diff --git a/dot_local/share/scripts/executable_cargo-clean-all.nu b/dot_local/share/scripts/executable_cargo-clean-all.nu new file mode 100644 index 0000000..bc65084 --- /dev/null +++ b/dot_local/share/scripts/executable_cargo-clean-all.nu @@ -0,0 +1,15 @@ +#!/bin/nu + +def main [ + dir: string # The directory that contains the rust projects +] { + echo $"Cleaning ($dir)" + ( + ls $dir + | get name + | where ($it | ls $it | where name =~ 'Cargo.toml' | length ) > 0 + | par-each { cd $in; cargo clean } + | ignore + ) + echo $"($dir) cleaned" +}