Skip to content

Setting --encrypt as a default option for add #3469

Answered by twpayne
breisfeld asked this question in Q&A
Discussion options

You must be logged in to vote

There's currently no way to do this. Do you really want to encrypt every file managed by chezmoi?

As a work-around, you can create a shell alias, something like:

alias chezmoi-add="chezmoi add --encrypt"

and then use chezmoi-add instead of chezmoi add.

Alternatively, you could define a plugin:

#!/bin/bash
# put this in a file called chezmoi-adde somewhere in your path
exec chezmoi add --encrypt "$*"

and then use chezmoi adde instead of chezmoi add.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@breisfeld
Comment options

@twpayne
Comment options

@breisfeld
Comment options

@twpayne
Comment options

Answer selected by breisfeld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants