diff --git a/bash-abbr b/bash-abbr index c4df275..7791ace 100644 --- a/bash-abbr +++ b/bash-abbr @@ -212,6 +212,13 @@ _try_abbrev_internal () { declare -r point line_until_point=${line::point} if + # Check if the self-insertion character is a shell metacharacter, except tab and newline (we don't want + # interactive alias expansion on tab and newline is represented as the empty self-insertion character) + case "$self_insertion" in + (["${_bash_meta_chars_without_tab_and_nl[*]}"]|'') ;; + (*) false + esac && + # Check if the character at point is a shell metacharacter or EOL # [[ $point -eq ${#line} || "${line:point:1}" = ["${_bash_meta_chars[*]}"] ]] && # NOTE: Above line commented out, it's actually not that useful.