Add excluded_search_path_prefixes setting (#1165)
Improves performance in WSL Fix #1036 * Add excluded_search_path_prefixes setting Allows filtering the paths used to search for commands Can be useful to filter out /mnt/ in WSL for performance * Add test for excluded_search_path_prefixes * Apply suggestions from code review Co-authored-by: Pablo Aguiar <scorphus@gmail.com> Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
This commit is contained in:
@@ -434,6 +434,7 @@ Several *The Fuck* parameters can be changed in the file `$XDG_CONFIG_HOME/thefu
|
||||
* `wait_slow_command` – max amount of time in seconds for getting previous command output if it in `slow_commands` list;
|
||||
* `slow_commands` – list of slow commands;
|
||||
* `num_close_matches` – maximum number of close matches to suggest, by default `3`.
|
||||
* `excluded_search_path_prefixes` – path prefixes to ignore when searching for commands, by default `[]`.
|
||||
|
||||
An example of `settings.py`:
|
||||
|
||||
@@ -466,6 +467,7 @@ rule with lower `priority` will be matched first;
|
||||
* `THEFUCK_WAIT_SLOW_COMMAND` – max amount of time in seconds for getting previous command output if it in `slow_commands` list;
|
||||
* `THEFUCK_SLOW_COMMANDS` – list of slow commands, like `lein:gradle`;
|
||||
* `THEFUCK_NUM_CLOSE_MATCHES` – maximum number of close matches to suggest, like `5`.
|
||||
* `THEFUCK_EXCLUDED_SEARCH_PATH_PREFIXES` – path prefixes to ignore when searching for commands, by default `[]`.
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user