144144sheldon init --shell zsh
145145```
146146
147- This will create ` plugins.toml ` under ` ~/.sheldon ` or, if defined,
148- ` $XDG_CONFIG_HOME/sheldon ` . You can either edit this file directly or use the
149- provided command line interface to add or remove plugins.
147+ This will create ` plugins.toml ` under ` $XDG_CONFIG_HOME/sheldon ` , on most
148+ systems this will be ` ~/.config/sheldon/plugins.toml ` . You can either edit this
149+ file directly or use the provided command line interface to add or remove
150+ plugins.
150151
151152### Adding a plugin
152153
153154To add your first plugin append the following to the Sheldon config file.
154155
155156``` toml
156- # ~/.sheldon/plugins.toml
157+ # ~/.config/ sheldon/plugins.toml
157158
158159[plugins .base16 ]
159160github = " chriskempson/base16-shell"
@@ -217,10 +218,10 @@ sheldon init --shell zsh
217218
218219### ` lock `
219220
220- The ` lock ` command installs the plugins sources and generates the lock file
221- ( ` ~/.sheldon/plugins.lock ` ). Rerunning this command without any extra options
222- will not reinstall plugin sources, just verify that they are correctly
223- installed. It will always regenerate the lock file.
221+ The ` lock ` command installs the plugins sources and generates the lock file.
222+ Rerunning this command without any extra options will not reinstall plugin
223+ sources, just verify that they are correctly installed. It will always
224+ regenerate the lock file.
224225
225226``` sh
226227sheldon lock
@@ -324,20 +325,15 @@ be required if you are using an obscure operating system.
324325
325326* Environment variable:* ` SHELDON_CONFIG_DIR `
326327
327- Set the config directory where config will store the configuration file. If
328- Sheldon detects an XDG directory structure ([ as described
329- below] ( #xdg-directory-structure ) ) then this will default to
330- ` XDG_CONFIG_HOME/sheldon ` otherwise it will default to ` <home>/.sheldon ` where
331- ` <home> ` is the users home directory.
328+ Set the config directory where the configuration file will be stored. This
329+ defaults to ` $XDG_CONFIG_HOME/sheldon ` or ` ~/.config/sheldon ` .
332330
333331##### ` --data-dir <path> `
334332
335333* Environment variable:* ` SHELDON_DATA_DIR `
336334
337- Set the data directory where plugins will be downloaded to. If Sheldon detects
338- an XDG directory structure ([ as described below] ( #xdg-directory-structure ) ) then
339- this will default to ` XDG_DATA_HOME/sheldon ` otherwise it will default to
340- ` <home>/.sheldon ` where ` <home> ` is the users home directory.
335+ Set the data directory where plugins will be downloaded to. This defaults to
336+ ` $XDG_DATA_HOME/sheldon ` or ` ~/.local/share/sheldon ` .
341337
342338##### ` --config-file <path> `
343339
@@ -400,7 +396,7 @@ location of the source. There are three types of sources, each kind is described
400396in this section. A plugin may only specify * one* source type.
401397
402398``` toml
403- # ~/.sheldon/plugins.toml
399+ # ~/.config/ sheldon/plugins.toml
404400
405401# ┌─ Unique name for the plugin
406402# ┌──┴─┐
@@ -588,11 +584,10 @@ plugins.
588584
589585#### ` profiles `
590586
591- A list of profiles this plugin should be used in. If this field is not given
592- the plugin will be used regardless of the profile. Otherwise, the plugin is
593- only used if the specified
594- [ profile] ( https://sheldon.cli.rs/Command-line-interface.html#--profile-profile ) is included in the
595- configured list of profiles.
587+ A list of profiles this plugin should be used in. If this field is not given the
588+ plugin will be used regardless of the profile. Otherwise, the plugin is only
589+ used if the specified [ profile] ( https://sheldon.cli.rs/Command-line-interface.html#--profile-profile ) is
590+ included in the configured list of profiles.
596591
597592### Inline plugins
598593
@@ -643,10 +638,6 @@ github = "owner/repo"
643638apply = [" PATH" , " fpath" ]
644639```
645640
646- The ` each ` value, as used in the ` source ` template above, specifies that the
647- template should be applied to each matched file for the plugin. This defaults to
648- ` false ` .
649-
650641#### Custom templates
651642
652643It is possible to create your own custom templates, and you can even override
@@ -664,10 +655,8 @@ Plugins all have the following information that can be used in templates.
664655
665656* ** One or more files.** These are the matched files in the plugin directory
666657 either discovered using the the global ` match ` field or specified as a plugin
667- option with ` use ` . These can be used in templates using ` {{ file }} ` . This
668- information only makes sense in templates with ` each ` set to ` true ` .
669-
670- * ** The Sheldon data directory.** This directory can be used as ` {{ data_dir }} ` .
658+ option with ` use ` . These can be used in templates by iterating over the files.
659+ For example: ` {% for file in files %} ... {{ file }} ... {% endfor %} ` .
671660
672661To add or update a template add a new key to the ` [templates] ` table in the
673662config file. Take a look at the [ examples] ( https://sheldon.cli.rs/Examples.html ) for some interesting
0 commit comments