X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; q=dns; s=default; b=t3A2WIiHkUa7IBkm
	b7vpozyNnsvR5n0ULFgx07XtJy8r+Az3UvQEVVZJ1HguGQRGCdbCmxhZ6N1bNAJ8
	96eeQV+m9V/ZxP+BVLCxsj9waT4QVKjgJbApQDelPV4x6n1mR9WjkHd4FYd6a/ki
	osFObslGga2Puw8L5bYHdijCs/Q=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; s=default; bh=1bQpwJpiSTlWf+aEAuarz7
	FOX1c=; b=leVa7nhGuEeKUOFiG0YAdBgyW52RmS5Do55PHuZ/jbsmpl1VBQa3fW
	At5KVUDAXqIq4v+PH/cxOHdAGnmbYDceYITIEbf5pOl3iyAEQ//4nOy8Z26BFUuE
	5i3TolE88KcUJYu+uojJi2zgWu906GDNW2F0EjdMneXSY/P3HU7fM=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=4.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: smtp.ht-systems.ru
Date: Wed, 14 Oct 2015 21:27:02 +0300
From: Andrey Repin <anrdaemon@yandex.ru>
Reply-To: cygwin@cygwin.com
Message-ID: <85116059.20151014212702@yandex.ru>
To: Adam Dinwoodie <cygwin@cygwin.com>, cygwin@cygwin.com
Subject: Re: [Attn: base-files maintainer] Changing /etc/profile to add more shell-dependent settings
In-Reply-To: <20151014171400.GP14466@dinwoodie.org>
References: <20151014155256.GN14466@dinwoodie.org> <876129s86w.fsf@Rainer.invalid>   <20151014171400.GP14466@dinwoodie.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

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:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

