@@ -1,6 +1,6 @@
11#!/usr/bin/env fish
22# Manage a container named after the current directory.
3−# c init [-c FILE] [extra create args] build + load the image, then create it
3+# c init [-c FILE] [extra create args] build + load the image, then (re)create it
44# (packages from FILE, default ./container.nix)
55# c start start it and attach
66
@@ -45,6 +45,8 @@ switch $argv[1]
4545 rm -rf $tmp
4646 test $rc -eq 0; or exit $rc
4747
48+ # Replace any existing container of the same name.
49+ container rm --force $name 2>/dev/null
4850 container create --name $name --ssh -it $argv nix-container:latest
4951 case start
5052 container start -ai $name