Attempted fix for keyboard bindings (#19)

This commit is contained in:
Nathan Broadbent
2012-03-10 12:51:18 +08:00
parent 7d6bbb3afd
commit b59caec489

View File

@@ -151,7 +151,7 @@ _bind(){
if [[ $shell == "zsh" ]]; then if [[ $shell == "zsh" ]]; then
bindkey -s "$1" "$2" bindkey -s "$1" "$2"
else # bash else # bash
bind "\"$1\": \"$2\"" bind "\"$1\": $2"
fi fi
fi fi
} }
@@ -160,8 +160,8 @@ _bind(){
if [[ "$git_keyboard_shortcuts_enabled" = "true" ]]; then if [[ "$git_keyboard_shortcuts_enabled" = "true" ]]; then
case "$TERM" in case "$TERM" in
xterm*|rxvt*) xterm*|rxvt*)
_bind "$git_commit_all_keys" " git_commit_all\n" _bind "$git_commit_all_keys" "\" git_commit_all\n\""
_bind "$git_add_and_commit_keys" "\e[1~ git_add_and_commit \n" _bind "$git_add_and_commit_keys" "\"\e[1~ git_add_and_commit \n\""
# Commands are prepended with a space so that they won't be added to history. # Commands are prepended with a space so that they won't be added to history.
# Make sure this is turned on with: # Make sure this is turned on with: