all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Plan for fish shell in Guix.
@ 2019-01-07  9:25 Meiyo Peng
  2019-01-07 11:36 ` Ricardo Wurmus
  2019-01-21  8:32 ` Meiyo Peng
  0 siblings, 2 replies; 10+ messages in thread
From: Meiyo Peng @ 2019-01-07  9:25 UTC (permalink / raw)
  To: guix-devel

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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-22  2:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07  9:25 Plan for fish shell in Guix Meiyo Peng
2019-01-07 11:36 ` 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.