When users have an alias or function that shadows 'echo', it can break
autosuggestions by either printing wrong suggestions or executing
unwanted functions. This commit replaces all 'echo' calls with
'builtin echo' to ensure the shell's built-in echo is always used.
Fixes: #843
Maybe this is also a fix for #247, #248 and #258. Supersedes #267.
Testcase:
Using match_prev_cmd strategy and with these lines in history:
echo '1^'
echo '2^'
echo '1^'
type:
echo (unexpected suggestion echo '1^' instead of echo '2^')
echo '1^1 (wrong suggestion echo '1^1echo '1^')
echo '1^# (error "bad math expression")