doc/git_integration.md in power_stencil-0.8.14 vs doc/git_integration.md in power_stencil-0.9.0

- old
+ new

@@ -11,10 +11,11 @@ - [Entity creation](#entity-creation) - [Modifying an entity](#modifying-an-entity) - [Deleting an entity](#deleting-an-entity) - [`PowerStencil` shell session](#powerstencil-shell-session) - [Plugin creation](#plugin-creation) + - [(Re)Generating `zsh` command line completion for the project](#regenerating-zsh-command-line-completion-for-the-project) - [Manual actions](#manual-actions) <!-- /TOC --> [:back:][Documentation root] @@ -34,23 +35,24 @@ <a name="subcommands-impact"></a> | `PowerStencil` sub-command | Status | |----------------------------|:------:| -|init | creates a project -|info | read-only -|plugin | creates a plugin -|get | read-only -|shell | do anything -|adm | read-only -|check | read-only -|create | creates entities -|edit | modifies entities -|delete | deletes entities -|describe | read-only -|build | read-only +|`init` | creates a project +|`info` | read-only +|`plugin` | creates a plugin +|`get` | read-only +|`shell` | do anything +|`adm --zsh-completion` | generates zsh command-line completion +|`check` | read-only +|`create` | creates entities +|`edit` | modifies entities +|`delete` | deletes entities +|`describe` | read-only +|`build` | read-only + On top this we could add some other actions, you can obviously perform manually within the repository, like: * Create/update/delete entity types * Create/update/delete entity type templates-templates * Code within local plugins @@ -303,9 +305,33 @@ create mode 100644 .ps_project/plugins/bar/spec/spec_helper.rb ``` Cool ! Nevertheless, plugins may be one of the things you may want to track a bit differently. For example as git sub-modules, to keep a separated git history, and ease future re-useability of the plugin you are developing. So it's up to you and `PowerStencil` provides an easy way to keep your plugin out of your project repo. Same as for `power_stencil init`, `power_stencil plugin --create` supports the `--no-git` option... + +## (Re)Generating `zsh` command line completion for the project + +If you generate the zsh command line completion file for the project by doing, from within the project: + + $ power_stencil adm --zsh-completion + +You will then generate a file that contains project-specific zsh completion directives: `.ps_project/.zsh_project_completion`. + +That file is versioned too, because its content depends on the plugins (local or as gems) that you actually use in this project. **If you add a new plugin or modify the way local ones handle the command-line, you should then regenerate it**, by re-running that command if you want the completion to fully take in account your changes. + +It is tracked like that: +``` +$ git log -1 --summary +commit 0c7bedb7249654873882c56bb15172c528511cff +Author: Joe <joe@outerspace.org> +Date: Sun Nov 10 11:21:10 2019 +0100 + + Adding project specific zsh completion file: '.ps_project/.zsh_project_completion'. + + create mode 100644 .ps_project/.zsh_project_completion +``` + + # Manual actions Ok, so far we have a pretty nice git history: