@@ -57,13 +57,13 @@ Description
5757
5858```
5959Usage
60- volt get [-help] [-l] [-u] [-v] [ {repository} ...]
60+ volt get [-help] [-l] [-u] [{repository} ...]
6161
6262Quick example
6363 $ volt get tyru/caw.vim # will install tyru/caw.vim plugin
6464 $ volt get -u tyru/caw.vim # will upgrade tyru/caw.vim plugin
6565 $ volt get -l -u # will upgrade all installed plugins
66- $ volt get -v tyru/caw.vim # will output more verbosely
66+ $ VOLT_DEBUG=1 volt get tyru/caw.vim # will output more verbosely
6767
6868 $ mkdir -p ~/volt/repos/localhost/local/hello/plugin
6969 $ echo 'command! Hello echom "hello"' >~/volt/repos/localhost/local/hello/plugin/hello.vim
@@ -78,8 +78,6 @@ Description
7878 and install it to:
7979 $VOLTPATH/plugconf/{repository}.vim
8080
81- If -v option was specified, output more verbosely.
82-
8381Repository List
8482 {repository} list (=target to perform installing, upgrading, and so on) is determined as followings:
8583 * If -l option is specified, all installed vim plugins (regardless current profile) are used
@@ -122,21 +120,97 @@ Repository path
122120Options
123121 -l use all installed repositories as targets
124122 -u upgrade repositories
125- -v output more verbosely
126123```
127124
128125# volt list
129126
130127```
131128Usage
132- volt list [-help]
129+ volt list [-help] [-f {text/template string}]
133130
134131Quick example
135132 $ volt list # will list installed plugins
136133
134+ Show all installed repositories:
135+
136+ $ volt list -f '{{ range .Repos }}{{ println .Path }}{{ end }}'
137+
138+ Show repositories used by current profile:
139+
140+ $ volt list -f '{{ range .Profiles }}{{ if eq $.CurrentProfileName .Name }}{{ range .ReposPath }}{{ . }}{{ end }}{{ end }}{{ end }}'
141+
142+ Or (see "Additional property"):
143+
144+ $ volt list -f '{{ range currentProfile.ReposPath }}{{ println . }}{{ end }}'
145+
146+ Template functions
147+
148+ json value [prefix [indent]] (string)
149+ Returns JSON representation of value.
150+ The argument is same as json.MarshalIndent().
151+
152+ currentProfile (Profile (see "Structures"))
153+ Returns current profile
154+
155+ currentProfile (Profile (see "Structures"))
156+ Returns given name's profile
157+
158+ version (string)
159+ Returns volt version string. format is "v{major}.{minor}.{patch}" (e.g. "v0.3.0")
160+
161+ versionMajor (number)
162+ Returns volt major version
163+
164+ versionMinor (number)
165+ Returns volt minor version
166+
167+ versionPatch (number)
168+ Returns volt patch version
169+
170+ Structures
171+ This describes the structure of lock.json .
172+ {
173+ // lock.json structure compatibility version
174+ "version": <int64>,
175+
176+ // Unique number of transaction
177+ "trx_id": <int64>,
178+
179+ // Current profile name (e.g. "default")
180+ "current_profile_name": <string>,
181+
182+ // All Installed repositories
183+ // ("volt list" shows current profile's repositories, which is not the same as this)
184+ "repos": [
185+ {
186+ // "git" (git repository) or "static" (static repository)
187+ "type": <string>,
188+
189+ // Unique number of transaction
190+ "trx_id": <int64>,
191+
192+ // Repository path like "github.com/vim-volt/vim-volt"
193+ "path": <string>,
194+
195+ // Git commit hash. if "type" is "static" this property does not exist
196+ "version": <string>,
197+ },
198+ ],
199+
200+ // Profiles
201+ "profiles": [
202+ // Profile name (.e.g. "default")
203+ "name": <string>,
204+
205+ // Repositories ("volt list" shows these repositories)
206+ "repos_path": [ <string> ],
207+ ]
208+ }
209+
137210Description
138- This is shortcut of:
139- volt profile show {current profile}
211+ Vim plugin information extractor.
212+ If -f flag is not given, this command shows vim plugins of **current profile** (not all installed plugins) by default.
213+ If -f flag is given, it renders by given template which can access the information of lock.json .
140214```
141215
142216# volt migrate
@@ -183,10 +257,6 @@ Command
183257 profile rm [-current | {name}] {repository} [{repository2} ...]
184258 Remove one or more repositories from profile {name}.
185259
186- profile use [-current | {name}] vimrc [true | false]
187- profile use [-current | {name}] gvimrc [true | false]
188- Set vimrc / gvimrc flag to true or false.
189-
190260Quick example
191261 $ volt profile list # default profile is "default"
192262 * default
@@ -208,9 +278,6 @@ Quick example
208278 $ volt profile rm foo tyru/caw.vim # disable loading tyru/caw.vim on "foo" profile
209279
210280 $ volt profile destroy foo # will delete profile "foo"
211-
212- $ volt profile use -current vimrc false # Disable installing vimrc on current profile on "volt build"
213- $ volt profile use default gvimrc true # Enable installing gvimrc on profile default on "volt build"
214281```
215282
216283# volt rm
@@ -226,7 +293,8 @@ Quick example
226293 $ volt rm -r -p tyru/caw.vim # Remove tyru/caw.vim plugin from lock.json, and remove repository directory, plugconf
227294
228295Description
229- Uninstall {repository} on every profile.
296+ Uninstall one or more {repository} from every profile.
297+ This results in removing vim plugins from ~/.vim/pack/volt/opt/ directory.
230298 If {repository} is depended by other repositories, this command exits with an error.
231299
232300 If -r option was given, remove also repository directories of specified repositories.
0 commit comments