-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Rename remove command to destroy
- Loading branch information
Showing
8 changed files
with
48 additions
and
48 deletions.
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,17 @@ | ||
# `destroy` *target*... | ||
|
||
!!! warning | ||
|
||
The `destroy` command permanently removes files both from your home directory and chezmoi's source directory. | ||
|
||
Only run `chezmoi destroy` if you have a separate backup of your home directory and your source directory. | ||
|
||
If you want chezmoi to stop managing the file use [`forget`](forget.md) instead. | ||
|
||
If you want to remove all traces of chezmoi from your system use [`purge`](purge.md) instead. | ||
|
||
Remove *target* from the source state, the destination directory, and the state. | ||
|
||
## `-f`, `--force` | ||
|
||
Destroy without prompting. |
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 was deleted.
Oops, something went wrong.
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
14 changes: 7 additions & 7 deletions
14
internal/cmd/testdata/scripts/remove.txtar → internal/cmd/testdata/scripts/destroy.txtar
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# test that chezmoi remove does not delete the source directory when removing a file in an exact directory | ||
# test that chezmoi destroy does not delete the source directory when removing a file in an exact directory | ||
mkdir $HOME/.dir | ||
mkfile $HOME/.dir/test.file | ||
exec chezmoi remove --force $HOME${/}.dir/test.file | ||
exec chezmoi destroy --force $HOME${/}.dir/test.file | ||
exists $CHEZMOISOURCEDIR | ||
|
||
-- home/user/.local/share/chezmoi/exact_dot_dir/.keep -- |