Skip to content

Add the --version command line option #37

Description

@jcouball

Implement the --version command line option.

  • Use the same parser as chezmoi in order to be able to easily be able to parse the command line in the same way that chezmoi does
  • Where it makes sense, follow the same code structure as chezmoi so that people familiar with that project can easily pick up this project
  • Output the same thing that chezmoi does (but as applied to chezroot). It may be worth seeing how chezmoi implements their version command
  • After the above is implemented and tested, after displaying the chezroot version line, run chezmoi to show the chezmoi version
  • For now, anything else given on the command line should fail, giving the command line usage (anything other than chezroot --version should fail for now.

Here is an example of the chezmoi --version command line:

$ chezmoi --version
chezmoi version v2.67.0, commit 8591960c5b55b27d3806c6754232e1a6980957e1, built at 2025-11-02T19:38:29Z, built by Homebrew

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions