- Update to zsh 5.3
* Unicode9 support, this needs support from your terminal to work correctly. * The new word modifier ':P' computes the physical path of the argument. * The output of "typeset -p" uses "export" commands or the "-g" option for parameters that are not local to the current scope. * vi-repeat-change can repeat user-defined widgets if the widget calls zle -f vichange. * The parameter $registers now makes the contents of vi register buffers available to user-defined widgets. * New vi-up-case and vi-down-case builtin widgets bound to gU/gu (or U/u in visual mode) for doing case conversion. * A new select-word-match function provides vim-style text objects with configurable word boundaries using the existing match-words-by-style mechanism. * Support for the conditional expression [[ -v var ]] to test if a variable is set for compatibility with other shells. * The print and printf builtins have a new option -v to assign the output to a variable. * New x: syntax in completion match specifications make it possible to disable match specifications hardcoded in completion functions. - Re-add custom zshrc and zshenv to unbreak compatibility with old usage (boo#998858). OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=177
This commit is contained in:
parent
53e6c17916
commit
f2f0b6e2a1
13
fix-printf.patch
Normal file
13
fix-printf.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: zsh-5.3/Src/builtin.c
|
||||||
|
===================================================================
|
||||||
|
--- zsh-5.3.orig/Src/builtin.c
|
||||||
|
+++ zsh-5.3/Src/builtin.c
|
||||||
|
@@ -100,7 +100,7 @@ static struct builtin builtins[] =
|
||||||
|
|
||||||
|
BUILTIN("popd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 1, BIN_POPD, "q", NULL),
|
||||||
|
BUILTIN("print", BINF_PRINTOPTS, bin_print, 0, -1, BIN_PRINT, "abcC:Df:ilmnNoOpPrRsSu:v:x:X:z-", NULL),
|
||||||
|
- BUILTIN("printf", 0, bin_print, 1, -1, BIN_PRINTF, "v:", NULL),
|
||||||
|
+ BUILTIN("printf", BINF_SKIPINVALID | BINF_SKIPDASH, bin_print, 1, -1, BIN_PRINTF, "v:", NULL),
|
||||||
|
BUILTIN("pushd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 2, BIN_PUSHD, "qsPL", NULL),
|
||||||
|
BUILTIN("pushln", 0, bin_print, 0, -1, BIN_PRINT, NULL, "-nz"),
|
||||||
|
BUILTIN("pwd", 0, bin_pwd, 0, 0, 0, "rLP", NULL),
|
4
zprofile
4
zprofile
@ -1,3 +1,7 @@
|
|||||||
# we source the general profile here so we dont have to
|
# we source the general profile here so we dont have to
|
||||||
# reimplement it
|
# reimplement it
|
||||||
|
setopt nonomatch
|
||||||
source /etc/profile
|
source /etc/profile
|
||||||
|
unsetopt nonomatch
|
||||||
|
# put your own login shell specific configuration below
|
||||||
|
# this line
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f17916320ffaa844bbd7ce48ceeb5945fc5f3eff64b149b4229bbfbdf3795a9d
|
|
||||||
size 2820108
|
|
@ -1,11 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v1
|
|
||||||
|
|
||||||
iQEcBAABCAAGBQJWXz9JAAoJEKcdmp1L2yezZf0H/2kang8QyaG6v+n0VtKo5Wcf
|
|
||||||
U0BHiQ/EZDVR0LPt5+U22azFkPlLAXaRv7xbj+qvlwogrJUYpmupzKZJqetQITvP
|
|
||||||
YE/CAQQ3BQgIQG0iIzrPNdJC3ahQMKyqMbuxPTI7leoIKsbYFnWPDHPNe1irYSBZ
|
|
||||||
yCMUwgi5G+0i0uBxCvP/8b3SNAR44xAnofZ6RieInpPgY0q9fjVzO4aJfcVQroTX
|
|
||||||
E+t66ncXcMbDKa+kRxeLs4trCz/+I/OEJdCJTHQVegc/EWoY150NYYHmk2mxsQGY
|
|
||||||
r7yXCKcgX9+QfGyO3bLyVg3bQikprJaQahD1sRRnOCfpECtXOpT8oGk6gwOqgI0=
|
|
||||||
=UaqL
|
|
||||||
-----END PGP SIGNATURE-----
|
|
3
zsh-5.3.tar.xz
Normal file
3
zsh-5.3.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:76f82cfd5ce373cf799a03b6f395283f128430db49202e3e3f512fb5a19d6f8a
|
||||||
|
size 2928684
|
11
zsh-5.3.tar.xz.asc
Normal file
11
zsh-5.3.tar.xz.asc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1
|
||||||
|
|
||||||
|
iQEcBAABCAAGBQJYTYfAAAoJEKcdmp1L2yezCKUH/RPI0C/WcqYcBU8NBZtESudL
|
||||||
|
WkHhoxndQGh3DwhNn6ueCEo3h7VFm+ET28fs7HDHcfcUynm6jiii/ZE4mGr628EI
|
||||||
|
oAEIQQs19ymmU1jCTFdZwMv7m+QJF/hjC0iIQUodXt3UuQ8x+hXdpGWP7Y9FyFt8
|
||||||
|
rMg4Yqh6Y+81IaFfVIItgpZtp1c8HcjUBC176sQV+Q5dmXSXCUg8zTV/jCqvnhes
|
||||||
|
mfMXDVlRUOWlz7YbVjg8G94e8RuK/EaBwVGmnmh7hXt0AoYlU5gLYxBg3QB+kd/J
|
||||||
|
sVAVs+W77AURRFXlxbsxAuWSGpwNtPl+nPGxJXh2whr8h8uhW12H6OdutGEF8Qw=
|
||||||
|
=DUlK
|
||||||
|
-----END PGP SIGNATURE-----
|
28
zsh.changes
28
zsh.changes
@ -1,3 +1,31 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 14 09:37:40 UTC 2016 - idonmez@suse.com
|
||||||
|
|
||||||
|
- Update to zsh 5.3
|
||||||
|
* Unicode9 support, this needs support from your terminal to
|
||||||
|
work correctly.
|
||||||
|
* The new word modifier ':P' computes the physical path of the
|
||||||
|
argument.
|
||||||
|
* The output of "typeset -p" uses "export" commands or the "-g"
|
||||||
|
option for parameters that are not local to the current scope.
|
||||||
|
* vi-repeat-change can repeat user-defined widgets if the widget
|
||||||
|
calls zle -f vichange.
|
||||||
|
* The parameter $registers now makes the contents of vi register
|
||||||
|
buffers available to user-defined widgets.
|
||||||
|
* New vi-up-case and vi-down-case builtin widgets bound to gU/gu
|
||||||
|
(or U/u in visual mode) for doing case conversion.
|
||||||
|
* A new select-word-match function provides vim-style text objects
|
||||||
|
with configurable word boundaries using the existing
|
||||||
|
match-words-by-style mechanism.
|
||||||
|
* Support for the conditional expression [[ -v var ]] to test if a
|
||||||
|
variable is set for compatibility with other shells.
|
||||||
|
* The print and printf builtins have a new option -v to assign the
|
||||||
|
output to a variable.
|
||||||
|
* New x: syntax in completion match specifications make it possible
|
||||||
|
to disable match specifications hardcoded in completion functions.
|
||||||
|
- Re-add custom zshrc and zshenv to unbreak compatibility with old
|
||||||
|
usage (boo#998858).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 8 13:25:28 UTC 2016 - idonmez@suse.com
|
Thu Sep 8 13:25:28 UTC 2016 - idonmez@suse.com
|
||||||
|
|
||||||
|
16
zsh.spec
16
zsh.spec
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: zsh
|
Name: zsh
|
||||||
Version: 5.2
|
Version: 5.3
|
||||||
Release: 0%{?dist}
|
Release: 0%{?dist}
|
||||||
Summary: Shell with comprehensive completion
|
Summary: Shell with comprehensive completion
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -26,7 +26,9 @@ Url: http://www.zsh.org
|
|||||||
Source0: http://www.zsh.org/pub/zsh-%{version}.tar.xz
|
Source0: http://www.zsh.org/pub/zsh-%{version}.tar.xz
|
||||||
Source1: http://www.zsh.org/pub/zsh-%{version}.tar.xz.asc
|
Source1: http://www.zsh.org/pub/zsh-%{version}.tar.xz.asc
|
||||||
Source2: %{name}.keyring
|
Source2: %{name}.keyring
|
||||||
Source3: zprofile
|
Source3: zshrc
|
||||||
|
Source4: zshenv
|
||||||
|
Source5: zprofile
|
||||||
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
|
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
|
||||||
Source11: zlogin.rhs
|
Source11: zlogin.rhs
|
||||||
Source12: zlogout.rhs
|
Source12: zlogout.rhs
|
||||||
@ -38,6 +40,7 @@ Source16: dotzshrc.rh
|
|||||||
Patch1: trim-unneeded-completions.patch
|
Patch1: trim-unneeded-completions.patch
|
||||||
# PATCH-FIX-OPENSUSE zsh-osc-completion.patch -- Fix openSUSE versions in osc completion
|
# PATCH-FIX-OPENSUSE zsh-osc-completion.patch -- Fix openSUSE versions in osc completion
|
||||||
Patch2: zsh-osc-completion.patch
|
Patch2: zsh-osc-completion.patch
|
||||||
|
Patch3: fix-printf.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: groff
|
BuildRequires: groff
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
@ -99,6 +102,7 @@ This package contains the Zsh manual in html format.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
# Remove executable bit
|
# Remove executable bit
|
||||||
chmod 0644 Etc/changelog2html.pl
|
chmod 0644 Etc/changelog2html.pl
|
||||||
@ -124,7 +128,8 @@ perl -p -i -e 's|/usr/local/bin|%{_bindir}|' \
|
|||||||
--with-tcsetpgrp \
|
--with-tcsetpgrp \
|
||||||
--enable-cap \
|
--enable-cap \
|
||||||
--enable-multibyte \
|
--enable-multibyte \
|
||||||
--enable-pcre
|
--enable-pcre \
|
||||||
|
--enable-unicode9
|
||||||
|
|
||||||
# Copy _rpm completion from Redhat (bnc#900424)
|
# Copy _rpm completion from Redhat (bnc#900424)
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
@ -158,7 +163,7 @@ install -m 0755 -Dd %{buildroot}/{etc,bin}
|
|||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
# install SUSE configuration
|
# install SUSE configuration
|
||||||
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}
|
install -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}
|
||||||
|
|
||||||
# Create custom completion directory
|
# Create custom completion directory
|
||||||
mkdir %{buildroot}%{_sysconfdir}/zsh_completion.d
|
mkdir %{buildroot}%{_sysconfdir}/zsh_completion.d
|
||||||
@ -251,7 +256,8 @@ fi
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc ChangeLog FEATURES LICENCE MACHINES META-FAQ NEWS README
|
%doc ChangeLog FEATURES LICENCE MACHINES META-FAQ NEWS README
|
||||||
%doc Etc/* intro.ps Misc/compctl-examples
|
%doc Etc/* intro.ps Misc/compctl-examples
|
||||||
|
%config(noreplace) %{_sysconfdir}/zshrc
|
||||||
|
%config(noreplace) %{_sysconfdir}/zshenv
|
||||||
%config(noreplace) %{_sysconfdir}/zprofile
|
%config(noreplace) %{_sysconfdir}/zprofile
|
||||||
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
|
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
|
||||||
%config(noreplace) %{_sysconfdir}/zlogin
|
%config(noreplace) %{_sysconfdir}/zlogin
|
||||||
|
252
zshrc
Normal file
252
zshrc
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
# read bash.bashrc first for some features we dont want
|
||||||
|
# to re-implement here
|
||||||
|
source /etc/bash.bashrc
|
||||||
|
|
||||||
|
# Custom completion support via /etc/zsh_completion.d
|
||||||
|
fpath=( $fpath /etc/zsh_completion.d )
|
||||||
|
|
||||||
|
# zsh line editing
|
||||||
|
: ${ZSHEDIT:="emacs"}
|
||||||
|
: ${TERM:=linux}
|
||||||
|
|
||||||
|
if [[ "$ZSHEDIT" == "vi" ]] then
|
||||||
|
bindkey -v
|
||||||
|
else
|
||||||
|
bindkey -e
|
||||||
|
bindkey "^[ " magic-space
|
||||||
|
bindkey "^[!" expand-history
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILE=${HOME}/.zsh_history
|
||||||
|
SAVEHIST=500
|
||||||
|
|
||||||
|
# Prompt on the right side. zsh feature
|
||||||
|
#RPROMPT="[%T]"
|
||||||
|
|
||||||
|
# Set/unset shell options
|
||||||
|
setopt nocorrect
|
||||||
|
setopt pushdtohome
|
||||||
|
setopt autolist
|
||||||
|
setopt nopromptcr
|
||||||
|
setopt nocorrectall
|
||||||
|
setopt autocd
|
||||||
|
setopt recexact
|
||||||
|
setopt longlistjobs
|
||||||
|
setopt histignoredups
|
||||||
|
setopt pushdsilent
|
||||||
|
setopt appendhistory
|
||||||
|
setopt histexpiredupsfirst
|
||||||
|
setopt autopushd
|
||||||
|
setopt pushdminus
|
||||||
|
setopt extendedglob
|
||||||
|
setopt rcquotes
|
||||||
|
unsetopt bgnice
|
||||||
|
unsetopt autoparamslash
|
||||||
|
unsetopt hup
|
||||||
|
|
||||||
|
# Setup some basic programmable completions. To see more examples
|
||||||
|
# of these, check out /usr/doc/packages/zsh/compctl-examples.
|
||||||
|
# You you have a slow machine, you might want to comment the lines below
|
||||||
|
# with compctl in, and comment the below two lines out.
|
||||||
|
#
|
||||||
|
# compctl -g '*(-/)' cd pushd
|
||||||
|
# compctl -g '*(/)' rmdir dircmp
|
||||||
|
# compctl -j -P % -x 's[-] p[1]' -k signals -- kill
|
||||||
|
# compctl -j -P % fg bg wait jobs disown
|
||||||
|
# compctl -A shift
|
||||||
|
# compctl -caF type whence which
|
||||||
|
# compctl -F unfunction
|
||||||
|
# compctl -a unalias
|
||||||
|
# compctl -v unset typeset declare vared readonly export integer
|
||||||
|
# compctl -e disable
|
||||||
|
# compctl -d enable
|
||||||
|
#
|
||||||
|
# The default way is the usage of the zsh built-in completer
|
||||||
|
# Comment the two below lines out, if you are on a slow machine, and
|
||||||
|
# comment the above compctl lines in.
|
||||||
|
|
||||||
|
autoload -U compinit
|
||||||
|
compinit
|
||||||
|
|
||||||
|
# Completion so "cd ..<TAB>" -> "cd ../"
|
||||||
|
# zstyle ':completion:*' special-dirs ..
|
||||||
|
|
||||||
|
# Online help
|
||||||
|
unalias run-help 2>/dev/null || true
|
||||||
|
autoload run-help
|
||||||
|
|
||||||
|
# Don't use zsh builtin which
|
||||||
|
alias which >/dev/null && unalias which
|
||||||
|
|
||||||
|
# Common standard keypad and cursor
|
||||||
|
bindkey "^[[2~" yank
|
||||||
|
bindkey "^[[3~" delete-char
|
||||||
|
|
||||||
|
# History completion on pgup and pgdown
|
||||||
|
autoload -U history-search-end
|
||||||
|
zle -N history-beginning-search-backward-end history-search-end
|
||||||
|
zle -N history-beginning-search-forward-end history-search-end
|
||||||
|
bindkey "^[[5~" history-beginning-search-backward-end
|
||||||
|
bindkey "^[[6~" history-beginning-search-forward-end
|
||||||
|
|
||||||
|
if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then
|
||||||
|
bindkey "^[2;5~" yank
|
||||||
|
bindkey "^[3;5~" delete-char
|
||||||
|
bindkey "^[5;5~" up-history
|
||||||
|
bindkey "^[6;5~" down-history
|
||||||
|
fi
|
||||||
|
bindkey "^[[C" forward-char
|
||||||
|
bindkey "^[[D" backward-char
|
||||||
|
bindkey "^[[A" up-history
|
||||||
|
bindkey "^[[B" down-history
|
||||||
|
|
||||||
|
# Avoid network problems
|
||||||
|
# ... \177 (ASCII-DEL) and \010 (ASCII-BS)
|
||||||
|
# do `backward-delete-char'
|
||||||
|
# Note: `delete-char' is maped to \033[3~
|
||||||
|
# Therefore xterm's responce on pressing
|
||||||
|
# key Delete or KP-Delete should be
|
||||||
|
# \033[3~ ... NOT \177
|
||||||
|
bindkey "^?" backward-delete-char
|
||||||
|
bindkey "^H" backward-delete-char
|
||||||
|
|
||||||
|
# Home and End
|
||||||
|
if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then
|
||||||
|
# Normal keypad and cursor of xterm
|
||||||
|
bindkey "^[[1~" history-search-backward
|
||||||
|
bindkey "^[[4~" set-mark-command
|
||||||
|
bindkey "^[[H" beginning-of-line
|
||||||
|
bindkey "^[[F" end-of-line
|
||||||
|
# Home and End of application keypad and cursor of xterm
|
||||||
|
bindkey "^[OH" beginning-of-line
|
||||||
|
bindkey "^[OF" end-of-line
|
||||||
|
bindkey "^[O5H" beginning-of-line
|
||||||
|
bindkey "^[O5F" end-of-line
|
||||||
|
else
|
||||||
|
if [[ "$TERM" == "kvt" ]] then
|
||||||
|
bindkey "^[[1~" history-search-backward
|
||||||
|
bindkey "^[[4~" set-mark-command
|
||||||
|
bindkey "^[OH" beginning-of-line
|
||||||
|
bindkey "^[OF" end-of-line
|
||||||
|
else
|
||||||
|
# TERM=linux or console
|
||||||
|
bindkey "^[[1~" beginning-of-line
|
||||||
|
bindkey "^[[4~" end-of-line
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Application keypad and cursor of xterm
|
||||||
|
if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then
|
||||||
|
bindkey "^[OD" backward-char
|
||||||
|
bindkey "^[OC" forward-char
|
||||||
|
bindkey "^[OA" up-history
|
||||||
|
bindkey "^[OB" down-history
|
||||||
|
# DEC keyboard KP_F1 - KP_F4
|
||||||
|
bindkey -s "^[OP" "^["
|
||||||
|
bindkey "^[OQ" undo
|
||||||
|
bindkey "^[OR" undefined-key
|
||||||
|
bindkey "^[OS" kill-line
|
||||||
|
fi
|
||||||
|
if [[ "$TERM" == "gnome" ]] then
|
||||||
|
# or gnome terminal F1 - F4
|
||||||
|
bindkey -s "^[OP" "^["
|
||||||
|
bindkey "^[OQ" undo
|
||||||
|
bindkey "^[OR" undefined-key
|
||||||
|
bindkey "^[OS" kill-line
|
||||||
|
fi
|
||||||
|
# Function keys F1 - F12
|
||||||
|
if [[ "$TERM" == "linux" ]] then
|
||||||
|
# On console the first five function keys
|
||||||
|
bindkey "^[[[A" undefined-key
|
||||||
|
bindkey "^[[[B" undefined-key
|
||||||
|
bindkey "^[[[C" undefined-key
|
||||||
|
bindkey "^[[[D" undefined-key
|
||||||
|
bindkey "^[[[E" undefined-key
|
||||||
|
else
|
||||||
|
# The first five standard function keys
|
||||||
|
bindkey "^[[11~" undefined-key
|
||||||
|
bindkey "^[[12~" undefined-key
|
||||||
|
bindkey "^[[13~" undefined-key
|
||||||
|
bindkey "^[[14~" undefined-key
|
||||||
|
bindkey "^[[15~" undefined-key
|
||||||
|
fi
|
||||||
|
bindkey "^[[17~" undefined-key
|
||||||
|
bindkey "^[[18~" undefined-key
|
||||||
|
bindkey "^[[19~" undefined-key
|
||||||
|
bindkey "^[[20~" undefined-key
|
||||||
|
bindkey "^[[21~" undefined-key
|
||||||
|
# Note: F11, F12 are identical with Shift_F1 and Shift_F2
|
||||||
|
bindkey "^[[23~" undefined-key
|
||||||
|
bindkey "^[[24~" undefined-key
|
||||||
|
|
||||||
|
# Shift Function keys F1 - F12
|
||||||
|
# identical with F11 - F22
|
||||||
|
#
|
||||||
|
# bindkey "^[[23~" undefined-key
|
||||||
|
# bindkey "^[[24~" undefined-key
|
||||||
|
bindkey "^[[25~" undefined-key
|
||||||
|
bindkey "^[[26~" undefined-key
|
||||||
|
# DEC keyboard: F15=^[[28~ is Help
|
||||||
|
bindkey "^[[28~" undefined-key
|
||||||
|
# DEC keyboard: F16=^[[29~ is Menu
|
||||||
|
bindkey "^[[29~" undefined-key
|
||||||
|
bindkey "^[[31~" undefined-key
|
||||||
|
bindkey "^[[32~" undefined-key
|
||||||
|
bindkey "^[[33~" undefined-key
|
||||||
|
bindkey "^[[34~" undefined-key
|
||||||
|
if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then
|
||||||
|
# Not common
|
||||||
|
bindkey "^[[35~" undefined-key
|
||||||
|
bindkey "^[[36~" undefined-key
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then
|
||||||
|
# Application keypad and cursor of xterm
|
||||||
|
# with NumLock ON
|
||||||
|
#
|
||||||
|
# Operators
|
||||||
|
bindkey -s "^[Oo" "/"
|
||||||
|
bindkey -s "^[Oj" "*"
|
||||||
|
bindkey -s "^[Om" "-"
|
||||||
|
bindkey -s "^[Ok" "+"
|
||||||
|
bindkey -s "^[Ol" ","
|
||||||
|
bindkey -s "^[OM" "\n"
|
||||||
|
bindkey -s "^[On" "."
|
||||||
|
# Numbers
|
||||||
|
bindkey -s "^[Op" "0"
|
||||||
|
bindkey -s "^[Oq" "1"
|
||||||
|
bindkey -s "^[Or" "2"
|
||||||
|
bindkey -s "^[Os" "3"
|
||||||
|
bindkey -s "^[Ot" "4"
|
||||||
|
bindkey -s "^[Ou" "5"
|
||||||
|
bindkey -s "^[Ov" "6"
|
||||||
|
bindkey -s "^[Ow" "7"
|
||||||
|
bindkey -s "^[Ox" "8"
|
||||||
|
bindkey -s "^[Oy" "9"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# EMACS line editing
|
||||||
|
if [[ "$ZSHEDIT" == "emacs" ]] then
|
||||||
|
# ... xterm application cursor
|
||||||
|
if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then
|
||||||
|
bindkey "^[^[OD" backward-word
|
||||||
|
bindkey "^[^[OC" forward-word
|
||||||
|
bindkey "^[^[OA" up-history
|
||||||
|
bindkey "^[^[OB" down-history
|
||||||
|
bindkey "^^[OD" backward-char
|
||||||
|
bindkey "^^[OC" forward-char
|
||||||
|
bindkey "^^[OA" up-history
|
||||||
|
bindkey "^^[OB" down-history
|
||||||
|
fi
|
||||||
|
# Standard cursor
|
||||||
|
bindkey "^[^[[D" backward-word
|
||||||
|
bindkey "^[^[[C" forward-word
|
||||||
|
bindkey "^[^[[A" up-history
|
||||||
|
bindkey "^[^[[B" down-history
|
||||||
|
bindkey "^^[[D" backward-char
|
||||||
|
bindkey "^^[[C" forward-char
|
||||||
|
bindkey "^^[[A" up-history
|
||||||
|
bindkey "^^[[B" down-history
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user