This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Attn: base-files maintainer] Changing /etc/profile to add more shell-dependent settings

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
> /etc/profile.

> (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
for disaster.

With best regards,
Andrey Repin
Wednesday, October 14, 2015 21:25:05

Sorry for my terrible english...

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]