Skip to content

Add 'volt inspect' command like 'docker inspect' #64

@tyru

Description

@tyru

Interoperability with tools like peco, Vim.

Current

$ bin/volt list
name: default
use vimrc: true
use gvimrc: true
repos path:
  github.com/vim-volt/vim-volt (cfa20b6d2c4cc94c16693c49870a2fc1abbef458)
  github.com/tyru/capture.vim (6158526c1fef1e54e3456af5576ff961856b5a88)
  github.com/Shougo/neosnippet.vim (9ee1b4e059d4ffcc02312da13ee36315dacbffe4)
...
$ bin/volt query -l
github.com/vim-volt/vim-volt
  version: cfa20b6d2c4cc94c16693c49870a2fc1abbef458
  trx_id: 106
github.com/syngan/vim-vimlint
  version: 711e3476c32c11c780ea70711596263e7f66e395
  trx_id: 106
github.com/tyru/capture.vim
  version: 6158526c1fef1e54e3456af5576ff961856b5a88
  trx_id: 106
...

Expected (TODO)

  • Add volt inspect command

Show all repositories:

$ bin/volt inspect -f '{{range .Repos}}{{.Name}}{{end}}'

Show repositories used by current profile:

$ bin/volt inspect -f '{{ range .Profiles }}{{ if eq $.ActiveProfile .Name }}{{ range .ReposPath }}{{ . }}{{ end }}{{ end }}{{ end }}'

So ugly... adding 'CurrentProfile' to the root of lock.json structure only in volt inspect?

$ bin/volt inspect -f '{{ range .CurrentProfile.ReposPath }}{{ . }}{{ end }}'

(however, ActiveProfile (string) and CurrentProfile (struct) is so confusing)
created #74.

  • volt query can be removed because it can be replaced by volt inspect

  • Let volt list (alias of volt profile show {current profile}) use volt inspect internally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions