This is the mail archive of the
mailing list for the Cygwin project.
Re: [Attn: base-files maintainer] Changing /etc/profile to add more shell-dependent settings
- From: Achim Gratz <Stromeko at nexgo dot de>
- To: cygwin at cygwin dot com
- Date: Wed, 14 Oct 2015 18:53:27 +0200
- Subject: Re: [Attn: base-files maintainer] Changing /etc/profile to add more shell-dependent settings
- Authentication-results: sourceware.org; auth=none
- References: <20151014155256 dot GN14466 at dinwoodie dot org>
Adam Dinwoodie writes:
> The /etc/defaults/etc/profile file in base-files has a section at the
> end to import scripts in /etc/profile.d, but this currently only works
> with zsh.
No, this section is specific to zsh and probably even the wrong thing to
do -- /etc/profile is only ever intended to be run by POSIX compatible
shells (or shells in POSIX mode if they support that notion). I've kept
it alive for the time being since nothing packaged in Cygwin depends on
it. For anybody else using it for their personal customization it must
already be working.
> Can this section be expanded to make calls as appropriate for other
> shells? I'm particularly interested in Fish and Bash, although I don't
> see any reason to limit the change to those shells.
Bash can use ".sh" with the proviso that you can only use the POSIX
subset of its functionality. Other, non-POSIX, shells should implement
something similar in their own startup scripts. Csh already does, I
don't know enough about fish to tell how to insert something into its
start-up. IIRC, Zsh also has a way to run extra code besides just the
one in /etc/profile if you somehow need that.
> I care about this because I'm currently investigating packaging fzf.
> The obvious way to include the shell-specific keyboard shortcuts for fzf
> is to add them to /etc/profile.d, but currently that only works for
Look again, and don't let yourself get distracted by the zsh specific
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Waldorf MIDI Implementation & additional documentation:
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple