Skip to content

Commit def25fe

Browse files
committed
docs(README): elaborate and typofix command_not_found_handle FAQ item
The function is `command_not_found_handle` (no trailing `r`). Be somewhat more specific how to implement a well behaving/cooperating one.
1 parent a855714 commit def25fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,15 @@ A. Probably because the database is being queried every time and this uses a
254254
unless it detects that the database has changed since the file was created,
255255
in which case it will still use the database to ensure accuracy.
256256

257-
**Q. bash-completion interferes with my `command_not_found_handler` function!**
257+
**Q. bash-completion interferes with my `command_not_found_handle` function
258+
(or the other way around)!**
258259

259-
A. If your `command_not_found_handler` function is not intended to
260+
A. If your `command_not_found_handle` function is not intended to
260261
address (possibly missing) commands invoked during bash
261262
programmable completion functions, you can account for this
262-
by, for example, testing if the `$COMP_`\* variables are set and
263-
taking appropriate bypass or other action.
263+
in the function by, for example, testing if the `$COMP_LINE`
264+
variable is set and taking appropriate action, typically returning
265+
early and silently with success.
264266

265267
**Q. Can tab completion be made even easier?**
266268

0 commit comments

Comments
 (0)