Skip to content
  • Jiří Klimeš's avatar
    cli: allow specifying 'group.name' syntax for '--fields' · 94bb83a3
    Jiří Klimeš authored
    and use it for 'nmcli device show'.
    
    This allows filtering output not only for whole groups, but also for individual
    fields in commands that print data in groups (sections).
    
    Example:
    $ nmcli -f general.device,general.driver,ipv4,ipv6.address device show eth0
    GENERAL.DEVICE:                         eth0
    GENERAL.DRIVER:                         e1000e
    IP4.ADDRESS[1]:                         ip = 10.0.5.228/23, gw = 10.0.5.254
    IP4.ADDRESS[2]:                         ip = 5.5.5.5/32, gw = 5.5.5.1
    IP4.DNS[1]:                             192.168.122.1
    IP4.DNS[2]:                             8.8.8.8
    IP4.DOMAIN[1]:                          mycompany.com
    94bb83a3