From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48609 invoked by alias); 14 Oct 2015 16:53:37 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 47877 invoked by uid 89); 14 Oct 2015 16:53:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-in-13.arcor-online.net Received: from mail-in-13.arcor-online.net (HELO mail-in-13.arcor-online.net) (151.189.21.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 14 Oct 2015 16:53:34 +0000 Received: from mail-in-05-z2.arcor-online.net (mail-in-05-z2.arcor-online.net [151.189.8.17]) by mx.arcor.de (Postfix) with ESMTP id 3nbfvZ3lYmz31jD for ; Wed, 14 Oct 2015 18:53:30 +0200 (CEST) Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mail-in-05-z2.arcor-online.net (Postfix) with ESMTP id 7CF0B6F8851 for ; Wed, 14 Oct 2015 18:53:30 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-03.arcor-online.net 3nbfvZ2sgKzFnTN Received: from Gertrud (p54B47B23.dip0.t-ipconnect.de [84.180.123.35]) (Authenticated sender: stromeko@arcor.de) by mail-in-03.arcor-online.net (Postfix) with ESMTPSA id 3nbfvZ2sgKzFnTN for ; Wed, 14 Oct 2015 18:53:30 +0200 (CEST) From: Achim Gratz To: cygwin@cygwin.com Subject: Re: [Attn: base-files maintainer] Changing /etc/profile to add more shell-dependent settings References: <20151014155256.GN14466@dinwoodie.org> Date: Wed, 14 Oct 2015 16:53:00 -0000 In-Reply-To: <20151014155256.GN14466@dinwoodie.org> (Adam Dinwoodie's message of "Wed, 14 Oct 2015 16:52:56 +0100") Message-ID: <876129s86w.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2015-10/txt/msg00166.txt.bz2 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[0]. > 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 > Z-Shell. Look again, and don't let yourself get distracted by the zsh specific code. :-) Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Waldorf MIDI Implementation & additional documentation: http://Synth.Stromeko.net/Downloads.html#WaldorfDocs -- 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