* Bash-like backward delete.

* RPROMPT for remote prompts :)
This commit is contained in:
pztrn 2015-02-07 20:30:16 +05:00
parent df4338d387
commit cfa309ed3a
3 changed files with 8 additions and 6 deletions

View File

@ -3,3 +3,4 @@ zstyle :compinstall filename '${CONFIG_PATH}/.zshrc'
setopt completealiases
setopt correct
setopt interactivecomments

View File

@ -16,7 +16,11 @@ if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
zle -N zle-line-finish
fi
bindkey -e # Use emacs key bindings
# Bash-like backward delete.
autoload -U select-word-style
select-word-style bash
#bindkey -e # Use emacs key bindings
bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark
bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls
bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line.
@ -54,8 +58,3 @@ else
bindkey "^[3;5~" delete-char
bindkey "\e[3~" delete-char
fi
# Edit the current command line in $EDITOR
autoload -U edit-command-line
zle -N edit-command-line
bindkey '\C-x\C-e' edit-command-line

View File

@ -54,6 +54,8 @@ prompt_pztrn_setup () {
p_path="$vars['brackets_start']$vars['default_color'] %d $vars['brackets_end']"
PROMPT="$p_date$p_tty$p_plat$p_userpwd$p_shlvlhist$p_rc
$vars['console']$p_path $p_end"
RPROMPT="$p_date$p_tty$p_plat$p_userpwd$p_shlvlhist$p_rc
$vars['console']$p_path $p_end"
PS2='%(4_.\.)%3_> %E'