feat: Add {completions,plugins}/chezmoi (#477)

This commit is contained in:
Shubham Verma 2023-09-23 14:30:15 +05:30 committed by GitHub
parent b4a2264496
commit 72b8e67139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#! bash oh-my-bash.module
if _omb_util_command_exists chezmoi; then
eval -- "$(chezmoi completion bash)"
fi

14
plugins/chezmoi/README.md Normal file
View File

@ -0,0 +1,14 @@
# Chezmoi plugin
The chezmoi plugin defines a number of useful aliases for you. [Consult the complete list](./chezmoi.plugin.sh)
## List of aliases
| Alias | Command | Description |
|-------|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| cz | 'chezmoi' | Manage your dotfiles across multiple diverse machines, securely |
| cza | 'chezmoi add' | Add targets to the source state. |
| czcd | 'chezmoi cd' | cd's into the chezmoi source directory |
| cze | 'chezmoi edit' | Edit the source state of targets, which must be files or symlinks. If no targets are given then the working tree of the source directory is opened. |
| czea | 'chezmoi edit --apply' | Apply target immediately after editing. Ignored if there are no targets. |
| czra | 'chezmoi re-add' | Re-add modified files in the target state, preserving any encrypted\_ attributes. |

View File

@ -0,0 +1,8 @@
#! bash oh-my-bash.module
alias cz='chezmoi'
alias cza='chezmoi add'
alias czcd='chezmoi cd'
alias cze='chezmoi edit'
alias czea='chezmoi edit --apply'
alias czra='chezmoi re-add'