Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Development (http://www.linux-archive.org/archlinux-development/)
-   -   zsh, bash and filesystem (http://www.linux-archive.org/archlinux-development/26270-zsh-bash-filesystem.html)

Pierre Schmitz 01-01-2008 03:36 PM

zsh, bash and filesystem
 
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?

Pierre

PS: zsh seems to be really cool. The menu-based completition is quite nice.
See my .zshrc (based on the one from grml):
http://users.archlinux.de/~pierre/arch/zshrc

--
http://www.archlinux.de
#
# /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 %~]$ '
fi

Jeff Mickey 01-01-2008 11:32 PM

zsh, bash and filesystem
 
I'm curious why you removed maildir-support and zsh-secure-free as flags to configure? I understand that you are saying the etcdir, zshenv, zlogin, zlogout, and zshrc have zsh not read /etc/profile for some reason or another, but I don't understand why you'd remove free() checking and maildir support..

And I've never gotten /etc/profile to be read in bash or zsh when I don't use a login shell, that's why my default for screen and urxvt are to open login shells for zsh.

// jeff
--
.: [ + carpe diem totus tuus + ] :.

Pierre Schmitz 01-02-2008 09:30 AM

zsh, bash and filesystem
 
Am Mittwoch, 2. Januar 2008 01:32:09 schrieb Jeff Mickey:
> I'm curious why you removed maildir-support and zsh-secure-free as flags to
> configure? *I understand that you are saying the etcdir, zshenv, zlogin,
> zlogout, and zshrc have zsh not read /etc/profile for some reason or
> another, but I don't understand why you'd remove free() checking and
> maildir support..

Don't worry about this. I did not remove those options for any reason; I just
played around with compiling zsh. And those options are not relevant for my
problem.

>
> And I've never gotten /etc/profile to be read in bash or zsh when I don't
> use a login shell, that's why my default for screen and urxvt are to open
> login shells for zsh.

I am a bit confused. If I use bash as my default shell, I can use xterm,
Konsole etc. without any problems. E.g. locale is set correctly and I can
read and write "umlauts".

Does xterm and co automatically use a login shell when using bash? Does bash
propagate some global settings like LANG and INPUTRC even when not used as a
login shell and zsh does not do this?

Pierre
--
archlinux.de


All times are GMT. The time now is 07:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.