From 074b205a825c49280f7944efd9bf6f0af6d1155d Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Fri, 1 Dec 2023 07:46:22 +0000 Subject: other: change group -> group_processes for consistency between config and command-line args (#1344) * other: change group -> group_processes to match config file name * update docs * update changelog --- CHANGELOG.md | 4 ++++ docs/content/configuration/command-line-flags.md | 2 +- src/args.rs | 6 +++--- src/options.rs | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f7fcd7b..9b28dd82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1276](https://github.com/ClementTsang/bottom/pull/1276): Add GPU process info. +### 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. + ### Bug Fixes - [#1314](https://github.com/ClementTsang/bottom/pull/1314): Fix fat32 mounts not showing up in macOS. diff --git a/docs/content/configuration/command-line-flags.md b/docs/content/configuration/command-line-flags.md index 17f78f8a..e2ab53ae 100644 --- a/docs/content/configuration/command-line-flags.md +++ b/docs/content/configuration/command-line-flags.md @@ -23,7 +23,7 @@ see information on these flags by running `btm -h`, or run `btm --help` to displ | --enable_gpu | Enable collecting and displaying GPU usage. | | -e, --expanded | Expand the default widget upon starting the app. | | -f, --fahrenheit | Sets the temperature type to Fahrenheit. | -| -g, --group | Groups processes with the same name by default. | +| -g, --group_processes | Groups processes with the same name by default. | | -a, --hide_avg_cpu | Hides the average CPU usage. | | --hide_table_gap | Hides spacing between table headers and entries. | | --hide_time | Hides the time scale. | diff --git a/src/args.rs b/src/args.rs index 9d3cccca..5da34f85 100644 --- a/src/args.rs +++ b/src/args.rs @@ -167,9 +167,9 @@ pub fn build_app() -> Command { .help("Uses a dot marker for graphs.") .long_help("Uses a dot marker for graphs as opposed to the default braille marker."); - let group = Arg::new("group") // TODO: Rename this to something like "group_process", would be "breaking" though. + let group_processes = Arg::new("group_processes") .short('g') - .long("group") + .long("group_processes") .action(ArgAction::SetTrue) .help("Groups processes with the same name by default.") .long_help("Groups processes with the same name by default."); @@ -432,7 +432,7 @@ use CPU (3) as the default instead. default_widget_type, disable_click, dot_marker, - group, + group_processes, hide_avg_cpu, hide_table_gap, hide_time, diff --git a/src/options.rs b/src/options.rs index a4d55047..152db131 100644 --- a/src/options.rs +++ b/src/options.rs @@ -207,7 +207,7 @@ pub fn build_app( let expanded_upon_startup = is_flag_enabled!(expanded_on_startup, matches, config); // For processes - let is_grouped = is_flag_enabled!("group", group_processes, matches, config); + let is_grouped = is_flag_enabled!(group_processes, matches, config); let is_case_sensitive = is_flag_enabled!(case_sensitive, matches, config); let is_match_whole_word = is_flag_enabled!(whole_word, matches, config); let is_use_regex = is_flag_enabled!(regex, matches, config); -- cgit v1.2.3