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: Andrey Repin <anrdaemon at yandex dot ru>
- To: Adam Dinwoodie <cygwin at cygwin dot com>, cygwin at cygwin dot com
- Date: Wed, 14 Oct 2015 21:27:02 +0300
- 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> <876129s86w dot fsf at Rainer dot invalid> <20151014171400 dot GP14466 at dinwoodie dot org>
- Reply-to: cygwin at cygwin dot com
Greetings, Adam Dinwoodie!
> That, however, doesn't give me anywhere to put the Bash fzf script.
> It's not POSIX compliant, so I don't want to use ".sh". I can't
> find any directory other than /etc/profile.d that Bash trawls, though.
If my opinion matters, I would advocate making scripts POSIX compliant, unless
there's strong reason to explicitly require shell-dependent functionality.
> The only other option I can think of is to rename the .bash file to .sh
> and to patch it to check $BASH_VERSION before running the Bash-specific
> code. That seems fragile though -- it means putting Bashisms in a
> script that may be run by non-Bash shells (even if it's gated by
> checking $BASH_VERSION), and it means a patch of the upstream fzf Bash
> script in a way that's essentially just duplicating code already in
> (The upstream solution to this is to add code to the user's ~/.bashrc to
> source the relevant scripts, but I don't think that's feasible when
> installing the scripts via setup-*.exe.)
It isn't feasible at all, touching user's profile scripts is a ready recipe
With best regards,
Wednesday, October 14, 2015 21:25:05
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple