Only try expansion when the self-insertion character is a shell meta-char
This commit is contained in:
parent
9f4875ebcc
commit
0593b06daf
1 changed files with 7 additions and 0 deletions
|
|
@ -212,6 +212,13 @@ _try_abbrev_internal () {
|
||||||
declare -r point line_until_point=${line::point}
|
declare -r point line_until_point=${line::point}
|
||||||
|
|
||||||
if
|
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
|
# Check if the character at point is a shell metacharacter or EOL
|
||||||
# [[ $point -eq ${#line} || "${line:point:1}" = ["${_bash_meta_chars[*]}"] ]] &&
|
# [[ $point -eq ${#line} || "${line:point:1}" = ["${_bash_meta_chars[*]}"] ]] &&
|
||||||
# NOTE: Above line commented out, it's actually not that useful.
|
# NOTE: Above line commented out, it's actually not that useful.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue