[zsh] Update shell init: rc
This commit is contained in:
parent
b09d523218
commit
c30b46a88b
26 changed files with 479 additions and 462 deletions
27
zsh/func/init_rc_configure_zle
Normal file
27
zsh/func/init_rc_configure_zle
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env zsh
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
function init_rc_configure_zle
|
||||
{
|
||||
shell-log 'Configuring ZLE'
|
||||
|
||||
local mode=$1
|
||||
if [[ -z "$mode" ]]; then
|
||||
mode=emacs
|
||||
fi
|
||||
|
||||
function configure_zle_emacs { }
|
||||
function configure_zle_vim { }
|
||||
|
||||
shell-log -l debug "Using $mode command line editing mode"
|
||||
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
|
||||
}
|
||||
|
||||
init_rc_configure_zle "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue