guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

use zsh as login shell


From: 宋文武
Subject: use zsh as login shell
Date: Thu, 27 Nov 2014 23:58:38 +0800
User-agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-unknown-linux-gnu)

Currently, zsh doesn't work out of box.

IMO, we should use `/etc/environment' for system variables:
    LANG=en_US.UTF-8
    PATH=/run/current-system/profile/bin:/run/setuid-programs
And add `pam_env.so' to /etc/pam.d/login, to make tty login work.

With `/etc/profile', `/etc/zlogin' just:
    source /etc/environment
to make `bash -l' and `zsh -l' work.

And `~/.bash_profile', `~/.zlogin' for user variables:
    [[ $- == *i* ]] && source ~/.bashrc # only for bash
    
    export PATH=$PATH:$HOME/.guix-profile/bin

Use `~/.bashrc', `~/.zshrc' for interactive settings:
    PS1='$ '
    alias ls='ls -p --color'
    # $(guix package --search-paths)?


Note:
  non-login interactive should inherit env from parent,
  eg: `env -i $(which bash)' spawn a shell with no PATH (what I expect).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]