Mark Gardner
f695d1264b
fix(systemadmin): don't hardcode http20 network interface
...
The hardcoded `eth0` network interface in the `http20` function doesn't
exist on macOS. It's more reliable to dynamically determine the
appropriate interface, so this change checks what would be used to reach
Cloudflare's public 1.1.1.1 DNS service (yes, another hardcoded thing,
but at least it's common across the Internet) and uses that interface.
For example, on my macOS system, it returns either `en0` (Wi-Fi) or
`en7` (the Ethernet slot on my Thunderbolt dock).
On Linux, this uses the commonly installed `ip route` command from the
[iproute2](https://wiki.linuxfoundation.org/networking/iproute2 )
project. The macOS port of some of these utilities is available from
[Homebrew](https://brew.sh ) by running `brew install iproute2mac`.
This change also splits the pipeline in the function across multiple
lines per this project's
[Code Style Guide](https://github.com/ohmyzsh/ohmyzsh/wiki/Code-Style-Guide ).
2025-03-07 11:57:38 -06:00
Alexander Schaber
c1679a12f8
feat(systemadmin): add ping6
alias with count limit ( #12697 )
2024-09-27 11:39:09 +02:00
Marc Cornellà
53cb50acb5
refactor(systemadmin): use ss
instead of netstat
when available ( #11957 )
2023-10-11 20:43:55 +02:00
Marc Cornellà
e55e3f0f56
fix(systemadmin): handle error for no IPv6 route in geteip
( #11458 )
2023-01-26 20:45:48 +01:00
Ben Iofel
4392d3a923
feat(systemadmin): color ip
if shell is interactive ( #11107 )
2022-11-15 19:29:48 +01:00
Marc Cornellà
ac82e156ca
style(systemadmin): use function
to avoid alias conflicts
2022-04-13 13:14:38 +02:00
Josh Soref
0e41181d54
chore: fix spelling errors across the project ( #10459 )
...
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-12-01 12:20:31 +01:00
Kevin Burke
e86c6f5e7f
style: use -n
flag in head
and tail
commands ( #10391 )
...
Co-authored-by: Marc Cornellà <hello@mcornella.com>
2021-11-09 09:04:10 +01:00
Wolfgang Ladermann
1916a31153
feat(systemadmin): add IPv6 info to geteip
command ( #9856 )
2021-04-23 16:23:26 +02:00
Marc Cornellà
02d07f3e3d
fix: use $USERNAME
guaranteed to always be defined in zsh
...
Fixes #9701
2021-03-25 12:08:00 +01:00
Joshua Pratt
1744277a68
systemadmin: correct sort order for psmem aliases ( #6253 )
2020-10-11 14:17:21 +02:00
Grégory DAVID
d88fbe625f
systemadmin: fix header line sorting in pscpu ( #6167 )
...
Inside `pscpu` and `pscpu10` aliases, remove sorting of the header line.
2020-02-10 21:18:13 +01:00
Patrick Artounian
ad9a8f2d43
systemadmin: fix getip output with ifconfig ( #7306 )
2018-10-25 13:26:22 +02:00
DBX12
0871594f58
systemadmin: refactor plugin and fix README ( #7295 )
2018-10-17 19:40:20 +02:00
Janosch Schwalm
19b925e741
use https everywhere ( #6574 )
...
* use https everywhere
* use https links on the files that are left
Also, removed some broken links and updated redirections.
2018-08-07 20:42:01 +02:00
Niccolò Maggioni
d923cebdb3
Updated with @mcornella suggestions
2015-08-27 11:34:53 +02:00
Niccolò Maggioni
058bbe4f02
General compatibility
2015-08-26 10:54:08 +02:00
Niccolò Maggioni
a127c4f88e
'ip' command compatibility and much quicker external IP detection
2015-08-26 10:48:01 +02:00
Marc Cornellà
4310a15de5
Change all pwd calls for $PWD variable
...
This avoids spawning additional processes as $PWD **always** contains
the current working directory.
2014-11-06 18:33:56 +01:00
Marc Cornellà
74177c5320
Change all whoami calls for $USER variable
...
This avoid spawning additional processes, as the $USER variable will
**always** contain the current logged-in user.
2014-11-06 18:33:56 +01:00
MrTux
3fac127152
Correct wrong plugin file name
2014-05-28 11:23:39 +02:00