diff --git a/content/config/nushell/aliases.nu.tmpl b/content/config/nushell/aliases.nu.tmpl index 5ecaed3..e2d5972 100644 --- a/content/config/nushell/aliases.nu.tmpl +++ b/content/config/nushell/aliases.nu.tmpl @@ -15,4 +15,18 @@ alias `shx` = sudo -E helix -c '{{dirs.config}}/helix/config.toml' alias devshell = nix develop -c $env.SHELL {{/if-installed}} +{{#if-installed docker}} +# purge all containers +def `docker purge-containers` [] { + ( docker container ls -a --format json + | lines + | each { + let id = (from json | get id); + docker container stop $id; + docker container rm $id; + } + ) +} +{{/if-installed}} + def --env `silo cd` [] { silo repo | cd $in }