cmd/tools/vpm: improve v show (#10198)
parent
4217f05146
commit
0d25106b4d
|
@ -582,22 +582,11 @@ Homepage: $module_meta_info.url
|
|||
Downloads: $module_meta_info.nr_downloads
|
||||
Installed: False
|
||||
--------
|
||||
')
|
||||
')
|
||||
continue
|
||||
}
|
||||
path := os.join_path(os.vmodules_dir(), module_name)
|
||||
mod := vmod.from_file(os.join_path(path, 'v.mod')) or { continue }
|
||||
// console_output := [
|
||||
// 'Name: $mod.name',
|
||||
// 'Version: $mod.version',
|
||||
// 'Description: $mod.description',
|
||||
// 'Homepage: $mod.repo_url',
|
||||
// 'Author: $mod.author',
|
||||
// 'License: $mod.license',
|
||||
// 'Location: $path',
|
||||
// 'Requires: ${mod.dependencies.join(', ')}',
|
||||
// ].join('\n')
|
||||
// println('${console_output}\n--------\n')
|
||||
print('Name: $mod.name
|
||||
Version: $mod.version
|
||||
Description: $mod.description
|
||||
|
|
|
@ -8,8 +8,8 @@ Examples:
|
|||
v run hello.v Same as above but also run the produced executable immediately after compilation.
|
||||
v -cg run hello.v Same as above, but make debugging easier (in case your program crashes).
|
||||
v -o h.c hello.v Translate `hello.v` to `h.c`. Do not compile further.
|
||||
|
||||
v watch hello.v Re-does the same compilation, when a source code change is detected.
|
||||
|
||||
v watch hello.v Re-does the same compilation, when a source code change is detected.
|
||||
The program is only compiled, not run.
|
||||
v watch run hello.v Re-runs the same `hello.v` file, when a source code change is detected.
|
||||
|
||||
|
@ -41,7 +41,8 @@ V supports the following commands:
|
|||
update Update an installed module from VPM.
|
||||
upgrade Upgrade all the outdated modules.
|
||||
list List all installed modules.
|
||||
outdated Show installed modules that need updates.
|
||||
outdated List installed modules that need updates.
|
||||
show Display information about a module on vpm
|
||||
|
||||
* Others:
|
||||
doctor Display some useful info about your system to help reporting bugs.
|
||||
|
|
|
@ -3,5 +3,6 @@ Usage:
|
|||
b) v update [MODULE...]
|
||||
c) v remove [MODULE...]
|
||||
d) v search KEYWORD[...]
|
||||
e) v show [MODULE...]
|
||||
|
||||
You can also pass -h or --help after each vpm command from the above, to see more details about it.
|
||||
|
|
|
@ -99,7 +99,7 @@ fn main() {
|
|||
eprintln('Translating C to V will be available in V 0.3')
|
||||
exit(1)
|
||||
}
|
||||
'search', 'install', 'update', 'upgrade', 'outdated', 'list', 'remove' {
|
||||
'install', 'list', 'outdated', 'remove', 'search', 'show', 'update', 'upgrade' {
|
||||
util.launch_tool(prefs.is_verbose, 'vpm', os.args[1..])
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue