SHA256
1
0
forked from pool/zsh
zsh/zshrc.rhs
Paolo Perego 5b73c0aed4 - Backport zsh-ab4d62eb975a4c4c51dd35822665050e2ddc6918.patch
and zsh-4c89849c98172c951a9def3690e8647dae76308f.patch and add
  autoconf to build requirements to make the package build with
  GCC 14. [boo#1225958]

If the request is OK, please forward it to Factory soon so that we can
switch the default compiler.

OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=251
2024-07-16 08:59:21 +00:00

51 lines
1.1 KiB
Plaintext

#
# /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