summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClementTsang <cjhtsang@uwaterloo.ca>2020-02-02 23:20:53 -0500
committerClementTsang <cjhtsang@uwaterloo.ca>2020-02-02 23:20:53 -0500
commit655188566695a74b69b4964081a93dc71f1e1252 (patch)
treebe1fa1405e2d23aa7ce4764cc1d0d73cc54a3ab8 /src
parentfc3a2e69ec834b209ee6f4e1dbf97b4d1cc96c81 (diff)
Update documentation and added more flags for search as per last commit
Diffstat (limited to 'src')
-rw-r--r--src/canvas.rs8
-rw-r--r--src/main.rs6
2 files changed, 9 insertions, 5 deletions
diff --git a/src/canvas.rs b/src/canvas.rs
index 962d6d40..b41ca8a6 100644
--- a/src/canvas.rs
+++ b/src/canvas.rs
@@ -32,7 +32,7 @@ const WINDOWS_NETWORK_HEADERS: [&str; 2] = ["RX", "TX"];
const FORCE_MIN_THRESHOLD: usize = 5;
lazy_static! {
- static ref HELP_TEXT: [Text<'static>; 20] = [
+ static ref HELP_TEXT: [Text<'static>; 22] = [
Text::raw("\nGeneral Keybindings\n"),
Text::raw("q, Ctrl-c to quit. Note if you are currently in the search widget, `q` will not work.\n"),
Text::raw("Ctrl-r to reset all data.\n"),
@@ -52,8 +52,10 @@ lazy_static! {
Text::raw("Tab to group together processes with the same name.\n"),
Text::raw("Ctrl-f to toggle searching for a process. / to just open it.\n"),
Text::raw("Use Ctrl-p and Ctrl-n to toggle between searching for PID and name.\n"),
- Text::raw("Use Ctrl-a and Ctrl-e to set the cursor to the start and end of the bar respectively.\n"),
- Text::raw("Use Tab to toggle whether to ignore case.\n"),
+ Text::raw("Use Tab to set the cursor to the start and end of the bar respectively.\n"),
+ Text::raw("Use Alt-c to toggle whether to ignore case.\n"),
+ Text::raw("Use Alt-m to toggle matching the entire word.\n"),
+ Text::raw("Use Alt-r to toggle regex.\n"),
Text::raw("\nFor startup flags, type in \"btm -h\".")
];
static ref COLOUR_LIST: Vec<Color> = gen_n_colours(constants::NUM_COLOURS);
diff --git a/src/main.rs b/src/main.rs
index 12c9cc88..54bb5f9f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -74,7 +74,9 @@ fn main() -> error::Result<()> {
//(@arg CONFIG_LOCATION: -co --config +takes_value "Sets the location of the config file. Expects a config file in the JSON format.")
//(@arg BASIC_MODE: -b --basic "Sets bottom to basic mode, not showing graphs and only showing basic tables.")
(@arg GROUP_PROCESSES: -g --group "Groups processes with the same name together on launch.")
- (@arg CASE_INSENSITIVE_DEFAULT: -i --case_insensitive "Do not match case when searching processes by default.")
+ (@arg CASE_INSENSITIVE: -i --case_insensitive "Do not match case when searching by default.")
+ (@arg WHOLE_WORD: -w --whole "Match whole word when searching by default.")
+ (@arg REGEX_DEFAULT: -x --regex "Use regex in searching by default.")
)
.get_matches();
@@ -132,7 +134,7 @@ fn main() -> error::Result<()> {
}
// Set default search method
- if matches.is_present("CASE_INSENSITIVE_DEFAULT") {
+ if matches.is_present("CASE_INSENSITIVE") {
app.search_state.toggle_ignore_case();
}