delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/10/14/12:53:52

X-Recipient: archive-cygwin AT delorie DOT 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:from:to:subject:references:date:in-reply-to
:message-id:mime-version:content-type; q=dns; s=default; b=OAFFM
ZVGrNZVKV58viRUZZY/x7tkrGgu1tY2EU4upSn8CtqSniA02l4gAsJymaVPbPxzT
6LCDkg88nxB0PQIHQIzRsmm4sZnLy83hzlmeVqUsiZqh2gpWKE85DPMJx7jbVxOf
1Y8gQhNiZUNGf3w8RPb03PD8h0i2tdE2mOAdQM=
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:from:to:subject:references:date:in-reply-to
:message-id:mime-version:content-type; s=default; bh=eBZRlWFoFkk
YQSi4QqtV0BPk+KE=; b=QoK5Jm87qF9VPkRxEOcdxv3j9coIxS7N43u258Vh2Q3
KC3AL7Wcb2WmJhexK+3XbploxpZaHMWWr6Bndp0eLtHFXbMC/c+7Ij6o2f40dCNS
uD/aT/1PLJUKIIJXYnNVTAJqQ5QnKKguRjOfD6NGdgg6Z6bNQaEBsqAcbzBkeBVU
=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-03.arcor-online.net 3nbfvZ2sgKzFnTN
From: Achim Gratz <Stromeko AT nexgo DOT de>
To: cygwin AT cygwin DOT com
Subject: Re: [Attn: base-files maintainer] Changing /etc/profile to add more shell-dependent settings
References: <20151014155256 DOT GN14466 AT dinwoodie DOT org>
Date: Wed, 14 Oct 2015 18:53:27 +0200
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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019