feat: add filtering of targets by arch
This commit is contained in:
parent
b0fe6b7384
commit
39a026fdb3
4 changed files with 16 additions and 0 deletions
|
|
@ -46,6 +46,11 @@ pub fn cmd() cli.Command {
|
|||
description: 'Search string to filter targets by.'
|
||||
flag: cli.FlagType.string
|
||||
},
|
||||
cli.Flag{
|
||||
name: 'arch'
|
||||
description: 'Only list targets that build for this arch.'
|
||||
flag: cli.FlagType.string
|
||||
},
|
||||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
|
|
@ -73,6 +78,11 @@ pub fn cmd() cli.Command {
|
|||
filter.query = query
|
||||
}
|
||||
|
||||
arch := cmd.flags.get_string('arch')!
|
||||
if arch != '' {
|
||||
filter.arch = arch
|
||||
}
|
||||
|
||||
raw := cmd.flags.get_bool('raw')!
|
||||
|
||||
list(conf, filter, raw)!
|
||||
|
|
|
|||
Reference in a new issue