Skip to content

Commit b7fd427

Browse files
committed
feat(reference): AstroUpdateCompleted usage for headless update
1 parent 2e0149a commit b7fd427

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/content/docs/reference/autocmds.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ Neovim autocmd events, check the help page with `:h autocmd-events`.
4242
- `AstroUpdateCompleted`: AstroNvim provides a custom command for easily
4343
updating all plugins and packages using `:AstroUpdate`.
4444
`AstroUpdateCompleted` is triggered after all of the available updates have
45-
been applied.
45+
been applied. Useful for headless updates:
46+
```bash
47+
nvim --headless -c "autocmd User AstroUpdateCompleted quitall" -c "AstroUpdate"
48+
```
4649

4750
- `AstroRenameFilePre`: AstroCore provides a `rename_file` method for easily
4851
renaming files. `AstroRenameFilePre` is triggered immediately prior to

0 commit comments

Comments
 (0)