Skip to content

Commit

Permalink
docs: Document config vars for command-specific flags
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Feb 15, 2024
1 parent 93766a4 commit b5fc7b6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/chezmoi.io/docs/reference/commands/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ This implies the `--template` option.

## `--encrypt`

> Configuration: `add.encrypt`
Encrypt files using the defined encryption method.

## `-f`, `--force`
Expand Down Expand Up @@ -53,6 +55,8 @@ Recursively add all files, directories, and symlinks.

## `-s`, `--secrets` `ignore`|`warning`|`error`

> Configuration: `add.secrets`
Action to take when a secret is found when adding a file. The default is
`warning`.

Expand All @@ -62,6 +66,8 @@ Set the `template` attribute on added files and symlinks.

## `--template-symlinks`

> Configuration: `add.templateSymlinks`
When adding symlink to an absolute path in the source directory or destination
directory, create a symlink template with `.chezmoi.sourceDir` or
`.chezmoi.homeDir`. This is useful for creating portable absolute symlinks.
Expand Down
4 changes: 4 additions & 0 deletions assets/chezmoi.io/docs/reference/commands/diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ appended automatically.

## `--reverse`

> Configuration: `diff.reverse`
Reverse the direction of the diff, i.e. show the changes to the target required
to match the destination.

## `--pager` *pager*

> Configuration: `diff.pager`
Pager to use for output.

!!! example
Expand Down
6 changes: 6 additions & 0 deletions assets/chezmoi.io/docs/reference/commands/edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,22 @@ command line flag is set.

## `-a`, `--apply`

> Configuration: `edit.apply`
Apply target immediately after editing. Ignored if there are no targets.

## `--hardlink` *bool*

> Configuration: `edit.hardlink`
Invoke the editor with a hard link to the source file with a name matching the
target filename. This can help the editor determine the type of the file
correctly. This is the default.

## `--watch`

> Configuration: `edit.watch`
Automatically apply changes when files are saved, with the following limitations:

* Only available when `chezmoi edit` is invoked with arguments (i.e.
Expand Down

0 comments on commit b5fc7b6

Please sign in to comment.