[zsh] Remove arguments from these init functions

This commit is contained in:
Eryn Wells 2022-05-25 17:02:26 -07:00
parent e8aae4ef89
commit b82c83073c
3 changed files with 21 additions and 31 deletions

View file

@ -1,24 +1,20 @@
#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
function init_rc_configure_zle
{
local mode=$1
if [[ -z "$mode" ]]; then
mode=emacs
fi
local mode=emacs
function configure_zle_emacs { }
function configure_zle_vim { }
if [[ -z "$mode" ]]; then
mode=emacs
fi
if [[ $mode == 'vim' ]]; then
bindkey -v
configure_zle_vim
zle -A .backward-delete-char vi-backward-delete-char
elif [[ $mode == 'emacs' ]]; then
bindkey -e
configure_zle_emacs
fi
}
function configure_zle_emacs { }
function configure_zle_vim { }
init_rc_configure_zle "$@"
if [[ $mode == 'vim' ]]; then
bindkey -v
configure_zle_vim
zle -A .backward-delete-char vi-backward-delete-char
elif [[ $mode == 'emacs' ]]; then
bindkey -e
configure_zle_emacs
fi