cli: allow midi:port_name pairs in --send option

This commit is contained in:
bordun 2020-01-28 16:03:58 +01:00
parent e4e64be47e
commit f1f03705a1
2 changed files with 4 additions and 3 deletions

View file

@ -8,6 +8,7 @@
- editor: set `label` to `auto` instead of `true` when using the toggle button
- editor: errors when hitting `mod + a` and unselecting widgets
- modal: correct popup title color
- options: allow `midi:port_name` pairs in `--send` option
- widgets:
- **new** `menu` widget, circular alternative to the dropdown & switch widgets
- file: allow selecting folders

View file

@ -1,8 +1,8 @@
module.exports = {
's':{alias:'send',type:'array',describe:'default targets for all widgets (ip:port or domain:port pairs)',
's':{alias:'send',type:'array',describe:'default targets for all widgets (ip:port / domain:port / midi:port_name pairs)',
check: (s)=>{
return s.some(item=>!item.match(/^[^:]*:[0-9]{4,5}$/)) ?
'Targets must be ip:port domain:port pairs & port must be >= 1024' : true
return s.some(item=>!item.match(/^[^:]*:[0-9]{4,5}$/) && !item.match(/^midi:.*$/)) ?
'Targets must be ip:port or domain:port pairs (udp / tcp port must be >= 1024) or midi:port_name pairs' : true
}
},
'l':{alias:'load',type:'string',file:{name:'OSC Session (.json)', extensions: ['json', 'js']},describe:'session file to load'},