assets/chezmoi.io/docs/reference/commands/import.md
import filenameImport the source state from an archive file in to a directory in the source
state. This is primarily used to make subdirectories of your home directory
exactly match the contents of a downloaded archive. You will generally always
want to set the --destination, --exact, and --remove-destination flags.
The supported archive formats are rar, tar, tar.gz, tgz, tar.bz2,
tbz2, txz, tar.zst, and zip.
-d, --destination directorySet the destination (in the source state) where the archive will be imported.
--exactSet the exact attribute on all imported directories.
-r, --remove-destinationRemove destination (in the source state) before importing.
--strip-components nStrip n leading components from paths.
-x, --exclude types--8<-- "common-flags/exclude.md"
-i, --include types--8<-- "common-flags/include.md"
curl -s -L -o ${TMPDIR}/oh-my-zsh-master.tar.gz https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz
mkdir -p $(chezmoi source-path)/dot_oh-my-zsh
chezmoi import --strip-components 1 --destination ~/.oh-my-zsh ${TMPDIR}/oh-my-zsh-master.tar.gz