Skip to content

Is it possible to get the exact variable type with range/limits when entering '?'/'TAB' #139

Description

@precla

Having the following:

interface <ifname:string interface()>("Interface name") {
    ip <ipaddr:ipv4addr>("IPv4 address"), set_interface_ip();
    ipv6 <ipaddr:ipv6addr>("IPv6 address"), set_interface_ipv6();
    mtu <size:uint16 range[68:65535]>("MTU size"), set_mtu();
}
network(config)>interface wlan0 mtu ?
  <size>                MTU size

Instead I'd like to see size[68:65535], like this:

network(config)>interface wlan0 mtu ?
  <size[68:65535]>                MTU size

Same for strings:

hostname("Change hostname") {
    <hostname:string length[8:32]>("hostname"), set_hostname();
}
network(config)>hostname ?
  <hostname>            hostname  

Having <hostname[8:32]> or similar would be nice. Or a bit more info, since in this cases i proposed, neither command's help tells us if it is a string or integer.

I also know that there are regex possibilities and combinations. So I'm not sure if this is doable in a sane and simple way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions