1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-11 00:00:06 +00:00
powerlevel10k/internal
Jonathan Sambrook 5691a418e0 Prefer ip over ifconfig for i/f detection.
`ifconfig`'s formatting doesn't cope well with long interface names. In
these cases it will eat up the whitespace separating the name from the
text "Link" in the output, which makes parsing the output problematic.

e.g. `ifconfig`:

    wlp0s20f0u2Link encap:Ethernet  HWaddr 00:AA:BB:CC:DD:EE

v.s `ip`:

   21: wlp0s20f0u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc \
       mq state UP group default qlen 1000

This commit swaps the order of detection inside
`_p9k_prompt_net_iface_async()`, so that `ip` will be preferred.

`ifconfig` is deprecated by distros in favour of `ip`, so this will
often be an incredibly marginal performance boost :)

NOTE: this commit does not address the problem with using `ifconfig`. I
don't understand the zsh regex, so have not touched it.
2022-11-14 13:52:07 +00:00
..
configure.zsh don't auto-start configuration wizard if it's likely that zshrc is broken 2021-11-15 07:26:51 +01:00
icons.zsh rename arch to cpu_arch and rewrite it (#1752) 2022-10-09 11:54:02 +02:00
notes.md notes 2020-06-15 17:56:32 +02:00
p10k.zsh Prefer ip over ifconfig for i/f detection. 2022-11-14 13:52:07 +00:00
parser.zsh don't leak 'token' local variable in parser (#1407) 2021-05-24 09:19:13 +02:00
wizard.zsh wizad: add a hint pointing to the frame when asking for frame color 2022-11-14 14:26:12 +01:00
worker.zsh survive broken $TMPDIR 2022-01-26 15:03:22 +01:00