diff --git a/dotzshrc b/dotzshrc index 9935bec..ebd96e7 100644 --- a/dotzshrc +++ b/dotzshrc @@ -4,31 +4,6 @@ # functions, options, key bindings, etc. # +# Setup new style completion system. autoload -U compinit compinit - -#allow tab completion in the middle of a word -setopt COMPLETE_IN_WORD - -## keep background processes at full speed -#setopt NOBGNICE -## restart running processes on exit -#setopt HUP - -## history -#setopt APPEND_HISTORY -## for sharing history between zsh processes -#setopt INC_APPEND_HISTORY -#setopt SHARE_HISTORY - -## never ever beep ever -#setopt NO_BEEP - -## automatically decide when to page a list of completions -#LISTMAX=0 - -## disable mail checking -#MAILCHECK=0 - -# autoload -U colors -#colors diff --git a/zlogin b/zlogin new file mode 100644 index 0000000..bafab73 --- /dev/null +++ b/zlogin @@ -0,0 +1,4 @@ +# +# '.zlogin' is sourced in login shells. It should contain +# commands that should be executed only in login shells. +# diff --git a/zlogin.rhs b/zlogin.rhs deleted file mode 100644 index 5b7de4a..0000000 --- a/zlogin.rhs +++ /dev/null @@ -1,8 +0,0 @@ -# -# /etc/zlogin and .zlogin are sourced in login shells. It should -# contain commands that should be executed only in -# login shells. It should be used to set the terminal -# type and run a series of external commands (fortune, -# msgs, from, etc). -# - diff --git a/zlogout b/zlogout new file mode 100644 index 0000000..7501f12 --- /dev/null +++ b/zlogout @@ -0,0 +1,5 @@ +# +# '.zlogout' is sourced when login shells exit +# + +clear diff --git a/zlogout.rhs b/zlogout.rhs deleted file mode 100644 index 3e78094..0000000 --- a/zlogout.rhs +++ /dev/null @@ -1,7 +0,0 @@ -# -# -# /etc/zlogout and ~/.zlogout are run when an interactive session ends -# -# - -clear diff --git a/zprofile b/zprofile new file mode 100644 index 0000000..7925b57 --- /dev/null +++ b/zprofile @@ -0,0 +1,8 @@ +# +# '.zlogout' is similar to `.zlogin', except that it is sourced before `.zshrc' +# + +PATH="$PATH:$HOME/bin" +export PATH + +[ -f /etc/profile ] && . /etc/profile diff --git a/zprofile.rhs b/zprofile.rhs deleted file mode 100644 index 03d316f..0000000 --- a/zprofile.rhs +++ /dev/null @@ -1,22 +0,0 @@ -# -# /etc/zprofile and ~/.zprofile are run for login shells -# - -PATH="$PATH:$HOME/bin" -export PATH - -_src_etc_profile() -{ - # Make /etc/profile happier, and have possible ~/.zshenv options like - # NOMATCH ignored. - # - emulate -L ksh - - # source profile - if [ -f /etc/profile ]; then - source /etc/profile - fi -} -_src_etc_profile - -unset -f _src_etc_profile diff --git a/zsh-5.6.2.tar.xz b/zsh-5.6.2.tar.xz deleted file mode 100644 index 52661e7..0000000 Binary files a/zsh-5.6.2.tar.xz and /dev/null differ diff --git a/zsh-5.7.1.tar.xz b/zsh-5.7.1.tar.xz new file mode 100644 index 0000000..321d9a3 Binary files /dev/null and b/zsh-5.7.1.tar.xz differ diff --git a/zsh.spec b/zsh.spec index 930c875..3b41116 100644 --- a/zsh.spec +++ b/zsh.spec @@ -1,19 +1,20 @@ %define _bindir /bin Name: zsh -Version: 5.6.2 -Release: 3 +Version: 5.7.1 +Release: 1 Summary: A shell designed for interactive use License: MIT URL: http://zsh.sourceforge.net Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz -# Source1 to Source6 get from fedora -Source1: zlogin.rhs -Source2: zlogout.rhs -Source3: zprofile.rhs -Source4: zshrc.rhs -Source5: zshenv.rhs +# There are five startup files that zsh will read commands from +# http://zsh.sourceforge.net/Intro/intro_3.html +Source1: zlogin +Source2: zlogout +Source3: zprofile +Source4: zshrc +Source5: zshenv Source6: dotzshrc BuildRequires: autoconf coreutils gawk gdbm-devel libcap-devel @@ -72,7 +73,7 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir install -d ${RPM_BUILD_ROOT}%{_sysconfdir} for i in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5}; do - install -m 644 $i $RPM_BUILD_ROOT%{_sysconfdir}/"$(basename $i .rhs)" + install -m 644 $i $RPM_BUILD_ROOT%{_sysconfdir}/"${i##*/}" done install -d $RPM_BUILD_ROOT%{_sysconfdir}/skel @@ -129,6 +130,12 @@ fi %{_datadir}/zsh %changelog +* Wed Jan 8 2020 openEuler Buildteam - 5.7.1-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update version to 5.7.1 + * Wed Dec 18 2019 jiangchuangang - 5.6.2-3 - Type:enhancement - ID:NA diff --git a/zshenv b/zshenv new file mode 100644 index 0000000..17f7564 --- /dev/null +++ b/zshenv @@ -0,0 +1,7 @@ +# +# `.zshenv' is sourced on all invocations of the shell, unless +# the -f option is set. It should contain commands to set the +# command search path, plus other important environment variables. +# `.zshenv' should not contain commands that produce output or +# assume the shell is attached to a tty. +# diff --git a/zshenv.rhs b/zshenv.rhs deleted file mode 100644 index a6614d3..0000000 --- a/zshenv.rhs +++ /dev/null @@ -1,14 +0,0 @@ -# /etc/zsh/zshenv: system-wide .zshenv file for zsh(1). -# -# This file is sourced on all invocations of the shell. -# If the -f flag is present or if the NO_RCS option is -# set within this file, all other initialization files -# are skipped. -# -# This file should contain commands to set the command -# search path, plus other important environment variables. -# This file should not contain commands that produce -# output or assume the shell is attached to a tty. -# -# Global Order: zshenv, zprofile, zshrc, zlogin - diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..beeed68 --- /dev/null +++ b/zshrc @@ -0,0 +1,19 @@ +# +# `.zshrc' is sourced in interactive shells. It should contain +# commands to set up aliases, functions, options, key bindings, etc. +# + +# Some nice key bindings +#bindkey '^X^Z' universal-argument ' ' magic-space +#bindkey '^X^A' vi-find-prev-char-skip +#bindkey '^Xa' _expand_alias +#bindkey '^Z' accept-and-hold +#bindkey -s '\M-/' \\\\ +#bindkey -s '\M-=' \| + +# bindkey -v # vi key bindings + +bindkey -e # emacs key bindings +bindkey ' ' magic-space # also do history expansion on space +bindkey '^I' complete-word # complete on tab, leave expansion to _expand + diff --git a/zshrc.rhs b/zshrc.rhs deleted file mode 100644 index 5b3b92a..0000000 --- a/zshrc.rhs +++ /dev/null @@ -1,50 +0,0 @@ -# -# /etc/zshrc is sourced in interactive shells. It -# should contain commands to set up aliases, functions, -# options, key bindings, etc. -# - -## shell functions -#setenv() { export $1=$2 } # csh compatibility - -# Set prompts -PROMPT='[%n@%m]%~%# ' # default prompt -#RPROMPT=' %~' # prompt for right side of screen - -# bindkey -v # vi key bindings -# bindkey -e # emacs key bindings -bindkey ' ' magic-space # also do history expansion on space - -# Provide pathmunge for /etc/profile.d scripts -pathmunge() -{ - if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then - if [ "$2" = "after" ] ; then - PATH=$PATH:$1 - else - PATH=$1:$PATH - fi - fi -} - -_src_etc_profile_d() -{ - # Make the *.sh things happier, and have possible ~/.zshenv options like - # NOMATCH ignored. - emulate -L ksh - - - # from bashrc, with zsh fixes - if [[ ! -o login ]]; then # We're not a login shell - for i in /etc/profile.d/*.sh; do - if [ -r "$i" ]; then - . $i - fi - done - unset i - fi -} -_src_etc_profile_d - -unset -f pathmunge _src_etc_profile_d -