Fix bug where alias could contain < or >
This commit is contained in:
parent
d241bfda6a
commit
30540f0bbf
1 changed files with 3 additions and 0 deletions
|
|
@ -210,6 +210,9 @@ _try_abbrev_internal () {
|
||||||
# But < and > are ignored, since they always expect a file/delimiter/string afterwards and not a command
|
# But < and > are ignored, since they always expect a file/delimiter/string afterwards and not a command
|
||||||
declare -r word_at_point=${line_until_point##*[&;()|[:space:]]} &&
|
declare -r word_at_point=${line_until_point##*[&;()|[:space:]]} &&
|
||||||
|
|
||||||
|
# Ensure that word does not contain either < or >
|
||||||
|
[[ ! $word_at_point =~ [\<\>] ]] &&
|
||||||
|
|
||||||
# Select replacement (if any)
|
# Select replacement (if any)
|
||||||
declare replacement=${BASH_ALIASES["${word_at_point:-__nonexistent}"]-} &&
|
declare replacement=${BASH_ALIASES["${word_at_point:-__nonexistent}"]-} &&
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue