As noted in https://github.com/andsens/homeshick/issues/223#issuecomment-2674190086 by @ushkinaz `sed -z` used here https://github.com/andsens/homeshick/blob/9768486e513523b1a3f7d3e44954e65eb2f6b979/lib/submodule_files.sh#L20 breaks on BSD systems. Replacing it with ``git ls-files -z | sed "s#\x00#\x00${repo//#/\\#}/#"`` should do the trick.