This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [Attn: base-files maintainer] Changing /etc/profile to add more shell-dependent settings
- From: Adam Dinwoodie <adam at dinwoodie dot org>
- To: cygwin at cygwin dot com
- Date: Wed, 14 Oct 2015 17:32:09 +0100
- 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> <1444839613 dot 11904 dot 6 dot camel at cygwin dot com>
- Reply-to: cygwin at cygwin dot com
On Wed, Oct 14, 2015 at 11:20:13AM -0500, Yaakov Selkowitz wrote:
> On Wed, 2015-10-14 at 16:52 +0100, Adam Dinwoodie wrote:
> > 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.
>
> Bash is covered by the "profile_d sh" command therein.
The `profile_d sh` command is run for all shells that execute that file;
looking at the code that appears to be at least Bash, Korn, Z and Posh.
I'm looking for `profile_d bash` and the like -- fzf's implementation
for Bash isn't going to be appropriate to run for other shells.
> > 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.
>
> Note that /etc/profile is only for Bourne-compatible shells; those that
> are not must use their own mechanism to accomplish the same thing (e.g.
> tcsh in /etc/csh.cshrc). As fish has a different syntax, it may fall
> into this category as well.
Okay, I'd assumed Fish would use /etc/profile, but if not I'll look at
finding some alternative for that.
Adam
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple