Files
haikuports/app-shells/zsh/additional-files/zprofile
PulkoMandy 3d303f66fa zsh: fix prompt configuration
Create a default zshrc file that sets up the prompt to behave the same
as the bash one set by Haiku. There was an attempt to patch the prompt
in zprofile already (after sourcing /etc/profile), but the prompt is now
too complex for the simple substitutions to work.

Avoids the problem reported in https://dev.haiku-os.org/ticket/17652
2022-12-20 19:35:33 +01:00

18 lines
530 B
Bash

# Emulate ksh as a walkaround for ksh-syntax within /etc/profile
emulate ksh -c 'source /etc/profile'
# Migration path for users who rely on the old behavior
(
setopt EXTENDED_GLOB
if [[ -n $ZDOTDIR && -z $ZDOTDIR/.z(login|logout|profile|shrc|shenv)(#qN) ]]; then
for i in "$HOME/config/settings/zsh"/z(login|logout|profile|shrc|shenv)(#qN)
do
local target=$ZDOTDIR/.$(basename "$i")
echo "Symlinking $i to $target..."
ln -sv "$i" "$target"
unset target
done
[[ -e $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv
fi
)