mirror of
https://github.com/rcaloras/bash-preexec.git
synced 2026-11-03 22:49:41 -09:00
Exclude the bind -x commands from interactive commands (#152)
* Exclude the `bind -x` commands from interactive commands * Check COMP_POINT instead of possibly empty COMP_LINE The check for COMP_LINE can fail because it can be empty in the completion function for the empty command line "complete -F _func -E".
This commit is contained in:
parent
1f77dc0935
commit
8926de0a1f
1 changed files with 3 additions and 3 deletions
|
|
@ -222,9 +222,9 @@ __bp_preexec_invoke_exec() {
|
|||
return
|
||||
fi
|
||||
|
||||
if [[ -n "${COMP_LINE:-}" ]]; then
|
||||
# We're in the middle of a completer. This obviously can't be
|
||||
# an interactively issued command.
|
||||
if [[ -n "${COMP_POINT:-}" || -n "${READLINE_POINT:-}" ]]; then
|
||||
# We're in the middle of a completer or a keybinding set up by "bind
|
||||
# -x". This obviously can't be an interactively issued command.
|
||||
return
|
||||
fi
|
||||
if [[ -z "${__bp_preexec_interactive_mode:-}" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue