nushell/crates/nu-command/src
Devyn Cairns 758c5d447a
Add support for the ps command on FreeBSD, NetBSD, and OpenBSD (#12892)
# Description

I feel like it's a little sad that BSDs get to enjoy almost everything
other than the `ps` command, and there are some tests that rely on this
command, so I figured it would be fun to patch that and make it work.

The different BSDs have diverged from each other somewhat, but generally
have a similar enough API for reading process information via
`sysctl()`, with some slightly different args.

This supports FreeBSD with the `freebsd` module, and NetBSD and OpenBSD
with the `netbsd` module. OpenBSD is a fork of NetBSD and the interface
has some minor differences but many things are the same.

I had wanted to try to support DragonFlyBSD too, but their Rust version
in the latest release is only 1.72.0, which is too old for me to want to
try to compile rustc up to 1.77.2... but I will revisit this whenever
they do update it. Dragonfly is a fork of FreeBSD, so it's likely to be
more or less the same - I just don't want to enable it without testing
it.

Fixes #6862 (partially, we probably won't be adding `zfs list`)

# User-Facing Changes
`ps` added for FreeBSD, NetBSD, and OpenBSD.

# Tests + Formatting
The CI doesn't run tests for BSDs, so I'm not entirely sure if
everything was already passing before. (Frankly, it's unlikely.) But
nothing appears to be broken.

# After Submitting
- [ ] release notes?
- [ ] DragonflyBSD, whenever they do update Rust to something close
enough for me to try it
2024-05-22 08:13:45 -07:00
..
bytes Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
charting Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
conversions Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
database Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
date Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
debug Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
env Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
experimental Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
filesystem Take owned Read and Write (#12909) 2024-05-20 15:10:36 +02:00
filters Take owned Read and Write (#12909) 2024-05-20 15:10:36 +02:00
formats Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
generators Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
hash Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
help Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
math Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
misc Use CommandType in more places (#12832) 2024-05-18 23:37:31 +00:00
network Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
path Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
platform Add Span merging functions (#12511) 2024-05-16 22:34:49 +00:00
random Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
removed Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
shells Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
stor Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
strings Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
system Add support for the ps command on FreeBSD, NetBSD, and OpenBSD (#12892) 2024-05-22 08:13:45 -07:00
viewers Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
default_context.rs Add support for the ps command on FreeBSD, NetBSD, and OpenBSD (#12892) 2024-05-22 08:13:45 -07:00
example_test.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
lib.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
progress_bar.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
sort_utils.rs Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00