diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-shells/zsh/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-shells/zsh/files')
-rw-r--r-- | app-shells/zsh/files/prompt_gentoo_setup-1 | 33 | ||||
-rw-r--r-- | app-shells/zsh/files/zprofile-1 | 42 | ||||
-rw-r--r-- | app-shells/zsh/files/zprofile-2 | 41 | ||||
-rw-r--r-- | app-shells/zsh/files/zprofile-3 | 38 | ||||
-rw-r--r-- | app-shells/zsh/files/zsh-5.1.0-gcc-5.patch | 16 | ||||
-rw-r--r-- | app-shells/zsh/files/zsh-5.3-init.d-gentoo.diff | 31 | ||||
-rw-r--r-- | app-shells/zsh/files/zsh-init.d-gentoo-r1.diff | 30 |
7 files changed, 231 insertions, 0 deletions
diff --git a/app-shells/zsh/files/prompt_gentoo_setup-1 b/app-shells/zsh/files/prompt_gentoo_setup-1 new file mode 100644 index 000000000000..046e2d87f53a --- /dev/null +++ b/app-shells/zsh/files/prompt_gentoo_setup-1 @@ -0,0 +1,33 @@ +# gentoo prompt theme + +prompt_gentoo_help () { + cat <<'EOF' +This prompt is color-scheme-able. You can invoke it thus: + + prompt gentoo [<promptcolor> [<usercolor> [<rootcolor>]]] + +EOF +} + +prompt_gentoo_setup () { + local prompt_gentoo_prompt=${1:-'blue'} + local prompt_gentoo_user=${2:-'green'} + local prompt_gentoo_root=${3:-'red'} + + if [ "$USER" = 'root' ] + then + local base_prompt="%B%F{$prompt_gentoo_root}%m%k " + else + local base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k " + fi + local post_prompt="%b%f%k" + + #setopt noxtrace localoptions + + local path_prompt="%B%F{$prompt_gentoo_prompt}%1~" + typeset -g PS1="$base_prompt$path_prompt %# $post_prompt" + typeset -g PS2="$base_prompt$path_prompt %_> $post_prompt" + typeset -g PS3="$base_prompt$path_prompt ?# $post_prompt" +} + +prompt_gentoo_setup "$@" diff --git a/app-shells/zsh/files/zprofile-1 b/app-shells/zsh/files/zprofile-1 new file mode 100644 index 000000000000..e78ec265bf51 --- /dev/null +++ b/app-shells/zsh/files/zprofile-1 @@ -0,0 +1,42 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/zsh/zprofile + +# Load environment settings from profile.env, which is created by +# env-update from the files in /etc/env.d +if [ -e "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env ] ; then + . "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env +fi + +# You should override these in your ~/.zprofile (or equivalent) for per-user +# settings. For system defaults, you can add a new file in /etc/profile.d/. +export EDITOR=${EDITOR:-/bin/nano} +export PAGER=${PAGER:-/usr/bin/less} + +# 077 would be more secure, but 022 is generally quite realistic +umask 022 + +# Set up PATH depending on whether we're root or a normal user. +# There's no real reason to exclude sbin paths from the normal user, +# but it can make tab-completion easier when they aren't in the +# user's PATH to pollute the executable namespace. +# +# It is intentional in the following line to use || instead of -o. +# This way the evaluation can be short-circuited and calling whoami is +# avoided. +if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then + @ZSH_NOPREFIX@PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}" + @ZSH_PREFIX@PATH="@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/sbin:@GENTOO_PORTAGE_EPREFIX@/bin:${ROOTPATH}:/usr/sbin:/usr/bin:/sbin:/bin" +else + @ZSH_NOPREFIX@PATH="/usr/local/bin:/usr/bin:/bin:${PATH}" + @ZSH_PREFIX@PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/bin:${PATH}:/usr/bin:/bin" +fi +export PATH +unset ROOTPATH + +shopts=$- +setopt nullglob +for sh in "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.d/*.sh ; do + [ -r "$sh" ] && . "$sh" +done +unsetopt nullglob +set -$shopts +unset sh shopts diff --git a/app-shells/zsh/files/zprofile-2 b/app-shells/zsh/files/zprofile-2 new file mode 100644 index 000000000000..9c4313c4494d --- /dev/null +++ b/app-shells/zsh/files/zprofile-2 @@ -0,0 +1,41 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/zsh/zprofile + +# Load environment settings from profile.env, which is created by +# env-update from the files in /etc/env.d +if [ -e "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env ] ; then + . "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env +fi + +# You should override these in your ~/.zprofile (or equivalent) for per-user +# settings. For system defaults, you can add a new file in /etc/profile.d/. +export EDITOR=${EDITOR:-/bin/nano} +export PAGER=${PAGER:-/usr/bin/less} + +# 077 would be more secure, but 022 is generally quite realistic +umask 022 + +# Set up PATH depending on whether we're root or a normal user. +# There's no real reason to exclude sbin paths from the normal user, +# but it can make tab-completion easier when they aren't in the +# user's PATH to pollute the executable namespace. +# +# It is intentional in the following line to use || instead of -o. +# This way the evaluation can be short-circuited and calling whoami is +# avoided. +if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then + @ZSH_NOPREFIX@PATH="${ROOTPATH}" + @ZSH_PREFIX@PATH="@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/sbin:@GENTOO_PORTAGE_EPREFIX@/bin:${ROOTPATH}:/usr/sbin:/usr/bin:/sbin:/bin" +@ZSH_PREFIX@else + @ZSH_PREFIX@PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/bin:${PATH}:/usr/bin:/bin" +fi +export PATH +unset ROOTPATH + +shopts=$- +setopt nullglob +for sh in "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.d/*.sh ; do + [ -r "$sh" ] && . "$sh" +done +unsetopt nullglob +set -$shopts +unset sh shopts diff --git a/app-shells/zsh/files/zprofile-3 b/app-shells/zsh/files/zprofile-3 new file mode 100644 index 000000000000..6c223a5ef158 --- /dev/null +++ b/app-shells/zsh/files/zprofile-3 @@ -0,0 +1,38 @@ +# /etc/zsh/zprofile + +# Load environment settings from profile.env, which is created by +# env-update from the files in /etc/env.d +if [ -e /etc/profile.env ] ; then + . /etc/profile.env +fi + +# You should override these in your ~/.zprofile (or equivalent) for per-user +# settings. For system defaults, you can add a new file in /etc/profile.d/. +export EDITOR=${EDITOR:-/bin/nano} +export PAGER=${PAGER:-/usr/bin/less} + +# 077 would be more secure, but 022 is generally quite realistic +umask 022 + +# Set up PATH depending on whether we're root or a normal user. +# There's no real reason to exclude sbin paths from the normal user, +# but it can make tab-completion easier when they aren't in the +# user's PATH to pollute the executable namespace. +# +# It is intentional in the following line to use || instead of -o. +# This way the evaluation can be short-circuited and calling whoami is +# avoided. +if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then + PATH="${ROOTPATH}" +fi +export PATH +unset ROOTPATH + +shopts=$- +setopt nullglob +for sh in /etc/profile.d/*.sh ; do + [ -r "$sh" ] && . "$sh" +done +unsetopt nullglob +set -$shopts +unset sh shopts diff --git a/app-shells/zsh/files/zsh-5.1.0-gcc-5.patch b/app-shells/zsh/files/zsh-5.1.0-gcc-5.patch new file mode 100644 index 000000000000..74756d2946c4 --- /dev/null +++ b/app-shells/zsh/files/zsh-5.1.0-gcc-5.patch @@ -0,0 +1,16 @@ +https://bugs.gentoo.org/547950 +http://www.zsh.org/mla/workers/2015/msg02660.html + +fix building w/gcc-5 + +--- a/Src/Modules/system.mdd ++++ b/Src/Modules/system.mdd +@@ -15,7 +15,7 @@ + touch errtmp.out; \ + else \ + $(AWK) -f $(sdir)/errnames1.awk @ERRNO_H@ >errtmp.c; \ +- $(CPP) errtmp.c >errtmp.out; \ ++ $(CPP) -P errtmp.c >errtmp.out; \ + fi + $(AWK) -f $(sdir)/errnames2.awk errtmp.out > $@ + rm -f errtmp.c errtmp.out diff --git a/app-shells/zsh/files/zsh-5.3-init.d-gentoo.diff b/app-shells/zsh/files/zsh-5.3-init.d-gentoo.diff new file mode 100644 index 000000000000..9deafd0d981c --- /dev/null +++ b/app-shells/zsh/files/zsh-5.3-init.d-gentoo.diff @@ -0,0 +1,31 @@ +--- zsh-5.3/Completion/Unix/Command/_init_d ++++ zsh-5.3/Completion/Unix/Command/_init_d +@@ -1,6 +1,6 @@ + #compdef -p */(init|rc[0-9S]#).d/* + +-local cmds script ++local cmds script opts + local -a flags + + _compskip=all +@@ -102,10 +102,18 @@ + + script=$words[1] + [[ $script = */* ]] || script="$(_init_d_fullpath "$script")" ++[[ ! -f $script ]] && ++ { _message "${words[1]:t} is not an init script" && return } ++ + + cmds=( $(_init_d_get_cmds) ) || return 1 + +-(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds || +- cmds=(start stop) ++(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds ++opts=(start stop restart pause zap status ineed iuse needsme usesme broken) ++ ++# If we didn't get $cmds from a zstyle, then read init script for opts. ++# If script doesn't specify opts, then default to the standard opts. ++(( $#cmds )) || cmds=( ${(eQz)${(M)${(f)"$( <$script)"}:#[[:blank:]]#opts=*}#*=} ) ++(( $#cmds )) || cmds=($opts) + + _arguments -s -A "-*" $flags ':init.d command:_sub_commands $cmds' diff --git a/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff b/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff new file mode 100644 index 000000000000..9597a733c903 --- /dev/null +++ b/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff @@ -0,0 +1,30 @@ +--- zsh-4.3.11/Completion/Unix/Command/_init_d ++++ zsh-4.3.11/Completion/Unix/Command/_init_d +@@ -1,6 +1,6 @@ + #compdef -p */(init|rc[0-9S]#).d/* + +-local cmds script ++local cmds script opts + + _compskip=all + +@@ -83,10 +83,17 @@ + + script=$words[1] + [[ $script = */* ]] || script="$(_init_d_fullpath "$script")" ++[[ ! -f $script ]] && ++ { _message "${words[1]:t} is not an init script" && return } + + cmds=( $(_init_d_get_cmds) ) || return + +-(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds || +- cmds=(start stop) ++(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds ++opts=(start stop restart pause zap status ineed iuse needsme usesme broken) ++ ++# If we didn't get $cmds from a zstyle, then read init script for opts. ++# If script doesn't specify opts, then default to the standard opts. ++(( $#cmds )) || cmds=( ${(eQz)${(M)${(f)"$( <$script)"}:#[[:blank:]]#opts=*}#*=} ) ++(( $#cmds )) || cmds=($opts) + + _sub_commands $cmds |