Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rearrange/resort args #1376

Merged
merged 6 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changes

- [#1344](https://github.com/ClementTsang/bottom/pull/1344): Change the `group` command line argument to `group_processes` for consistency with the config file option.
- [#1344](https://github.com/ClementTsang/bottom/pull/1344): Change the `group` command line-argument to `group_processes` for consistency with the config file option.
- [#1376](https://github.com/ClementTsang/bottom/pull/1376): Group together related command-line arguments in `-h` and `--help`.

### Bug Fixes

Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,20 @@ strip = false

[features]
battery = ["starship-battery"]
gpu = ["nvidia"]
nvidia = ["nvml-wrapper"]
gpu = ["nvidia"]
zfs = []

# Including logging for debugging purposes.
# Logging for debugging performance.
logging = ["fern", "log", "time/local-offset"]

# The features we use on deploy. Logging is not included as that is primarily (for now) just for debugging locally.
deploy = ["battery", "gpu", "zfs"]

default = ["deploy"]
default = ["battery", "gpu", "zfs"]

[dependencies]
anyhow = "1.0.75"
backtrace = "0.3.69"
cfg-if = "1.0.0"
clap = { version = "4.4.11", features = ["default", "cargo", "wrap_help"] }
clap = { version = "4.4.14", features = ["default", "cargo", "wrap_help"] }
concat-string = "1.0.1"
crossterm = "0.27.0"
ctrlc = { version = "3.4.1", features = ["termination"] }
Expand All @@ -93,7 +90,9 @@ indexmap = "2.1.0"
itertools = "0.12.0"
kstring = { version = "2.0.0", features = ["arc"] }
log = { version = "0.4.20", optional = true }
nvml-wrapper = { version = "0.9.0", optional = true, features = ["legacy-functions"] }
nvml-wrapper = { version = "0.9.0", optional = true, features = [
"legacy-functions",
] }
regex = "1.10.2"
serde = { version = "=1.0.193", features = ["derive"] }
starship-battery = { version = "0.8.2", optional = true }
Expand Down Expand Up @@ -133,15 +132,17 @@ filedescriptor = "0.8.2"

[dev-dependencies]
assert_cmd = "2.0.12"
cargo-husky = { version = "1.5.0", default-features = false, features = ["user-hooks"] }
cargo-husky = { version = "1.5.0", default-features = false, features = [
"user-hooks",
] }
predicates = "3.0.3"

[build-dependencies]
clap = { version = "4.4.11", features = ["default", "cargo", "wrap_help"] }
clap_complete = "4.4.5"
clap = { version = "4.4.14", features = ["default", "cargo", "wrap_help"] }
clap_complete = "4.4.6"
clap_complete_fig = "4.4.2"
clap_complete_nushell = "4.4.2"
clap_mangen = "0.2.15"
clap_mangen = "0.2.16"

[package.metadata.deb]
section = "utility"
Expand Down
7 changes: 6 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#[allow(dead_code)]
#[path = "src/options/args.rs"]
mod args;

use std::{
env, fs, io,
path::{Path, PathBuf},
};

use clap::Command;
use clap_complete::{generate_to, shells::Shell, Generator};
use clap_complete_fig::Fig;
use clap_complete_nushell::Nushell;

include!("src/options/args.rs");
use crate::args::build_app;

fn create_dir(dir: &Path) -> io::Result<()> {
let res = fs::create_dir_all(dir);
Expand Down
Loading