From 89d4df2a05afc6cc44d557d384994d7467615778 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Fri, 4 Nov 2022 09:25:17 -0700 Subject: [PATCH] document ifconfig limitations and recommend using ip --- docs/parsers/ifconfig.md | 9 ++++++++- jc/parsers/ifconfig.py | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/parsers/ifconfig.md b/docs/parsers/ifconfig.md index ac2d6adb..87a20bd0 100644 --- a/docs/parsers/ifconfig.md +++ b/docs/parsers/ifconfig.md @@ -5,7 +5,14 @@ jc - JSON Convert `ifconfig` command output parser -> Note: No `ifconfig` options are supported. +No `ifconfig` options are supported. + +Consider using the `ip` command instead of `ifconfig` as it supports native +JSON output and provides more detailed output than the `ifconfig` parser. +(e.g. support for multiple IPv4 and IPv6 addresses.) + +> Note: This parser will only output the last IPv4 and IPv6 address for +> each interface in the command output. Usage (cli): diff --git a/jc/parsers/ifconfig.py b/jc/parsers/ifconfig.py index c1db228c..94fa0096 100644 --- a/jc/parsers/ifconfig.py +++ b/jc/parsers/ifconfig.py @@ -1,6 +1,13 @@ """jc - JSON Convert `ifconfig` command output parser -> Note: No `ifconfig` options are supported. +No `ifconfig` options are supported. + +Consider using the `ip` command instead of `ifconfig` as it supports native +JSON output and provides more detailed output than the `ifconfig` parser. +(e.g. support for multiple IPv4 and IPv6 addresses.) + +> Note: This parser will only output the last IPv4 and IPv6 address for +> each interface in the command output. Usage (cli):