public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin@cygwin.com
Subject: Re: [Attn: base-files maintainer] Changing /etc/profile to add more shell-dependent settings
Date: Wed, 14 Oct 2015 16:53:00 -0000	[thread overview]
Message-ID: <876129s86w.fsf@Rainer.invalid> (raw)
In-Reply-To: <20151014155256.GN14466@dinwoodie.org> (Adam Dinwoodie's message	of "Wed, 14 Oct 2015 16:52:56 +0100")

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

  parent reply	other threads:[~2015-10-14 16:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 15:53 Adam Dinwoodie
2015-10-14 16:20 ` Yaakov Selkowitz
2015-10-14 16:32   ` Adam Dinwoodie
2015-10-14 16:20 ` Andrey Repin
2015-10-14 16:53 ` Achim Gratz [this message]
2015-10-14 17:14   ` Adam Dinwoodie
2015-10-14 18:35     ` Andrey Repin
2015-10-14 18:49       ` Adam Dinwoodie
2015-10-14 20:15     ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=876129s86w.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).