diff --git a/bash-abbr b/bash-abbr index 087eb4a..bba3d29 100644 --- a/bash-abbr +++ b/bash-abbr @@ -210,6 +210,9 @@ _try_abbrev_internal () { # 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:]]} && + # Ensure that word does not contain either < or > + [[ ! $word_at_point =~ [\<\>] ]] && + # Select replacement (if any) declare replacement=${BASH_ALIASES["${word_at_point:-__nonexistent}"]-} &&