[arch-dev-public] zsh, bash and filesystem

Pierre Schmitz pierre at archlinux.de
Tue Jan 1 11:36:05 EST 2008

Hello and a Happy New Year!

I am just testing zsh as a replacement of bash. Our zsh does not really work 
out-of-the-box. It does not use /etc/profile and as a result of this you 
cannot type or read umlauts etc..

I have opened a bug about this: http://bugs.archlinux.org/task/8946

But there does not seems to be a straight-forward-solution; so we should 
discuss about this first.

I have noticed that Aaron introduced a generic /etc/profile which will load 
all scripts in /etc/profile.d/ and source any specific file 
like /etc/profile.zsh, /etc/profile.bash etc..

At first: the filesystem package should be bumped to get the new /etc/profile 
due to a pacman bug (?).

Then we need to add a profile.zsh to the zsh package. I have attached a 
working one based on the one found within the bash package.

The configure-line o zsh should be changed to the following:

  ./configure --prefix=/usr --bindir=/bin \
    --enable-zprofile=/etc/profile \
    --with-curses-terminfo \
    --enable-multibyte || return 1

After this changes zsh is quite usable (even with utf8 etc.). But: This only 
works when logging in into a VT. If you start xterm, Konsole etc. you will 
end up in a zsh without any locale support and no environment variables set. 

Thomas told me that xterm does not use a login shell and because of 
this /etc/profile is not executed. (but why does this work with bash).

Does anybody know a clean solution for this?


PS: zsh seems to be really cool. The menu-based completition is quite nice. 
See my .zshrc (based on the one from grml): 

-------------- next part --------------
# /etc/profile.zsh
# Global settings for zsh shells

PS1='[%n@%m %~]$ '
PS2='> '
PS3='> '
PS4='+ '

export PS1 PS2 PS3 PS4

#In the future we may want to add more ulimit entries here,
# in the offchance that /etc/security/limits.conf is skipped
ulimit -Sc 0 #Don't create core files

if test "$TERM" = "xterm" -o \
        "$TERM" = "xterm-color" -o \
        "$TERM" = "xterm-256color" -o \
        "$TERM" = "rxvt" -o \
        "$TERM" = "rxvt-unicode" -o \
        "$TERM" = "xterm-xfree86"; then
    PROMPT='[%n@%m %~]$ '

More information about the arch-dev-public mailing list