From: Meiyo Peng <meiyo.peng@gmail.com>
To: guix-devel@gnu.org
Subject: Plan for fish shell in Guix.
Date: Mon, 07 Jan 2019 17:25:56 +0800 [thread overview]
Message-ID: <87imz0x1i3.fsf@gmail.com> (raw)
Hi,
I plan to make Guix more friendly for fish shell, so that users can set
fish shell as their login shell. It's not possible to set fish shell as
login shell now in Guix because fish shell cannot load environment
variables from /run/current-system/profile/etc/profile and
~/.guix-profile/etc/profile.
Guix can generate /etc/profile, /run/current-system/profile/etc/profile
for bash, so I think it can do the same for fish. I suggest we generate
configurations for system profile in
/run/current-system/profile/etc/fish/config.fish, and generate
configurations for user profile in ~/.guix-profile/etc/fish/config.fish.
Or generate configurations for system profile in
/run/current-system/profile/etc/fish/conf.d/00-guix-system.fish, and
generate configurations for user profile in
~/.guix-profile/etc/fish/conf.d/01-guix-user.fish. If we choose the
former, we should remove etc/fish/config.fish from the fish package to
avoid conflicts. That file is empty by default and is left for
sysadmins to edit so there will be no big problem.
I will learn how Guix generates /etc/profile, /etc/environment,
/run/current-system/profile/etc/profile, ~/.guix-profile/etc/profile
when I have time. Don't expect me to finish the work in one week.
As an alternative solution, we can also parse etc/profile from fish. I
am not sure if this is easier.
Please reply to this email if you have any ideas.
To help other people work on the problem, the following paragraphs
introduce fish shell initialization process. Based on
https://fishshell.com/docs/current/index.html#initialization.
1. $__fish_data_dir/config.fish
Usually: /usr/share/fish/config.fish
Guix: /gnu/store/*fish*/share/fish/config.fish
This file is provided by fish and should not be changed. It executes the
following files.
2. $__fish_sysconf_dir/config.fish
Usually: /etc/fish/config.fish
Guix: /gnu/store/*fish*/etc/fish/config.fish
etc/fish/config.fish does nothing by default. It's left for system-wide fish
configuration. In patch #34003, I let it source /etc/fish/config.fish, so we
can put system-wide configurations for guix in /etc/fish/config.fish.
3. Files ending in .fish, in the following directories. If there are multiple
files with the same name in these directories, only the first will be
executed. They are executed in order of their filename, sorted in a natural
order.
(1) $__fish_config_dir/conf.d
This is XDG_CONFIG_HOME/fish/conf.d.
Default: ~/.config/fish/conf.d
(2) $__fish_sysconf_dir/conf.d
Usually: /etc/fish/conf.d
Guix: /gnu/store/*fish*/etc/fish/conf.d
(3) $__extra_confdir
Usually: /usr/share/fish/vendor_conf.d
Guix: (After applying patch #34003)
| ~/.guix-profile/etc/fish/conf.d |
| /run/current-system/profile/etc/fish/conf.d |
| ~/.guix-profile/share/fish/vendor_conf.d |
| /run/current-system/profile/share/fish/vendor_conf.d |
| /gnu/store/*fish*/share/fish/vendor_conf.d |
4. $__fish_config_dir/config.fish
This is XDG_CONFIG_HOME/fish/config.fish.
Default: ~/.config/fish/config.fish.
--
Meiyo Peng
https://www.pengmeiyu.com/
next reply other threads:[~2019-01-07 9:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 9:25 Meiyo Peng [this message]
2019-01-07 11:36 ` Plan for fish shell in Guix Ricardo Wurmus
2019-01-07 11:45 ` Gábor Boskovits
2019-01-07 12:04 ` zimoun
2019-01-21 8:32 ` Meiyo Peng
2019-01-21 20:57 ` John Soo
2019-01-22 0:52 ` Meiyo Peng
2019-01-22 0:30 ` John Soo
2019-01-22 1:24 ` Meiyo Peng
2019-01-22 2:22 ` John Soo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87imz0x1i3.fsf@gmail.com \
--to=meiyo.peng@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).