Ignore bindings if not defined
This commit is contained in:
@@ -101,10 +101,12 @@ complete -o nospace -o filenames -F _git_index_tab_completion $git_index_alias
|
|||||||
|
|
||||||
# Cross-shell key bindings
|
# Cross-shell key bindings
|
||||||
_bind(){
|
_bind(){
|
||||||
if [[ $shell == "zsh" ]]; then # zsh
|
if [ -n "$1" ]; then
|
||||||
bindkey -s "$1" "$2"
|
if [[ $shell == "zsh" ]]; then # zsh
|
||||||
else # bash
|
bindkey -s "$1" "$2"
|
||||||
bind "\"$1\": \"$2\""
|
else # bash
|
||||||
|
bind "\"$1\": \"$2\""
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user