Refactor to remove prev cmd function and simplify escaping

This commit is contained in:
Eric Freese
2016-04-25 14:19:26 -06:00
parent c5f57da2b8
commit 011d8bdfd1
6 changed files with 20 additions and 48 deletions

View File

@@ -43,30 +43,4 @@ testEscapeCommand() {
"$(_zsh_autosuggest_escape_command '?')"
}
testPrevCommand() {
set_history <<-'EOF'
ls foo
ls bar
ls baz
EOF
assertEquals \
'Did not output the last command' \
'ls baz' \
"$(_zsh_autosuggest_prev_command)"
set_history <<-'EOF'
ls foo
ls bar
ls baz
ls quux
ls foobar
EOF
assertEquals \
'Did not output the last command' \
'ls foobar' \
"$(_zsh_autosuggest_prev_command)"
}
run_tests "$0"