Fixed test for shell and vi mode

This commit is contained in:
Nathan Broadbent
2012-03-10 17:11:32 +08:00
parent 1d65509bbd
commit ab7865867d

View File

@@ -161,7 +161,7 @@ if [[ "$git_keyboard_shortcuts_enabled" = "true" ]]; then
case "$TERM" in
xterm*|rxvt*)
# Uses emacs style keybindings, so vi mode is not supported for now
if ! ([[ $shell == "bash" ]] && set -o | grep -q '^vi .*on$'); then
if ! [[ $shell == "bash" ]] || set -o | grep -q '^vi .*on$'; then
_bind "$git_commit_all_keys" "\" git_commit_all\n\""
_bind "$git_add_and_commit_keys" "\"\e[1~ git_add_and_commit \n\""
fi