[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use zsh as login shell
From: |
宋文武 |
Subject: |
Re: use zsh as login shell |
Date: |
Tue, 02 Dec 2014 22:43:20 +0800 |
User-agent: |
Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-unknown-linux-gnu) |
Ludovic Courtès <address@hidden> writes:
> 宋文武 <address@hidden> skribis:
>
>> Ludovic Courtès <address@hidden> writes:
>>
>>> 宋文武 <address@hidden> skribis:
>>>
>>>> Ludovic Courtès <address@hidden> writes:
>
> [...]
>
>>> So, instead of what you suggest, what about having:
>>>
>>> 1. /etc/profile and /etc/zlogin (?) both source /etc/environment,
>>> which uses plain Bourne syntax.
>>>
>>> 2. PATH is defined in /etc/environment and includes
>>> ~/.guix-profile/bin.
>> /etc/environment is defined by pam_env to be a simple KEY=VAL file, with no
>> support for varibales substitute. If we do not use pam_env (linux
>> specified?),
>> I think we should let /etc/zlogin source /etc/profile instead.
>
> Yes, but they would contain almost the same lines, right? To what
> extent is zsh Bourne- or Bash-compatible? Does ‘export foo=bar’ work
> for zsh?
It does.
>
> If it does, let’s just keep /etc/profile, and use it for both zsh and
> Bash.
>
>> And we don't want /etc/zlogin when not using zsh at all,
>> IIUC while skeletons is configurable at the top os-expr, /etc/zlogin is
>> not.
>
> It’s OK to have a 2-KiB /etc/zlogin, even when one doesn’t use zsh.
>
>>> 3. The skeleton for ~/.bash_profile sources /etc/profile, /etc/bashrc,
>>> and ~/.bashrc.
>>>
>>> 4. The definition of PS1 is moved from /etc/profile to /etc/bashrc.
>>>
>>> 5. The skeleton for ~/.bashrc sources /etc/bashrc.
>> It seem too much, what I suggested is:
>> for login, su (pam_env): /etc/environment
>> for login shell: ~/.bash_profile, ~/.zlogin
>> for interactive: ~/.bashrc, ~/.zshrc
>> skeletons only installed when needed :)
>
> As a first step, what about always installing the skeletons? Then we
> can see whether/how to refine that.
No problem.
>
> Thanks,
> Ludo’.
And this is what I have so far:
0001-gnu-Add-etc-environment.patch
Description: Text Data
It only work when just one mingeety-service is enabled. Why :?