mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
DNS: print IPv4 first
This commit is contained in:
@@ -27,6 +27,14 @@ void ffPrintDNS(FFDNSOptions* options)
|
||||
FF_STRBUF_AUTO_DESTROY buf = ffStrbufCreate();
|
||||
FF_LIST_FOR_EACH(FFstrbuf, item, result)
|
||||
{
|
||||
if (!ffStrbufContainC(item, '.')) continue; // IPv4
|
||||
if (buf.length)
|
||||
ffStrbufAppendC(&buf, ' ');
|
||||
ffStrbufAppend(&buf, item);
|
||||
}
|
||||
FF_LIST_FOR_EACH(FFstrbuf, item, result)
|
||||
{
|
||||
if (!ffStrbufContainC(item, ':')) continue; // IPv6
|
||||
if (buf.length)
|
||||
ffStrbufAppendC(&buf, ' ');
|
||||
ffStrbufAppend(&buf, item);
|
||||
|
||||
Reference in New Issue
Block a user