Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Plugins | ||
|
||
chezmoi supports plugins, similar to git. | ||
|
||
If you run `chezmoi command` where *command* is not a builtin chezmoi command | ||
then chezmoi will look for a binary called `chezmoi-command` in your `$PATH`. If | ||
such a binary is found then chezmoi will execute it. Otherwise, chezmoi will | ||
report an unknown command error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[unix] chmod 755 bin/chezmoi-plugin | ||
|
||
# test that chezmoi returns unknown command errors for unknown commands | ||
! exec chezmoi unknown | ||
stderr 'unknown command' | ||
|
||
# test that chezmoi executes plugins | ||
exec chezmoi plugin | ||
stdout hello | ||
|
||
-- bin/chezmoi-plugin -- | ||
#!/bin/sh | ||
|
||
echo hello | ||
-- bin/chezmoi-plugin.cmd -- | ||
@echo hello |