Web lists-archives.com

Re: base-files revisited

On 2019-04-06 08:08, John Morrison wrote:
> I've been asked at work to get the standard base-files extended with
> specifics for the company I work for and wondered if this would be a good
> time to revisit how the .bashrc file in particular is put together.
> What I was considering would be introducing a ~/.bashrc.d/ folder and
> splitting the existing ~/.bashrc file into its component parts;
> * alias.bashrc
> * completion.bashrc
> * functions.bashrc
> * history.bashrc
> * shell.bashrc
> * umask.bashrc
> and changing .bashrc to source all the *.bashrc files.
> This would allow easier extension of the bashrc with, in my case, company
> specific options (proxies, common aliases etc).
> I was also thinking of taking some more of the sample from
> https://www.tldp.org/LDP/abs/html/sample-bashrc.html, for example the
> colours and some more of the aliases and adding them into the existing sets.
> Thoughts?
> I think Achim Gratz took over the base-files from me. Achim, are you still
> around? Open for a discussion?
> Kind regards

You might want to consider using standard /etc/profile.d/ scripts named for, and
conditional on, your company domain, Cygwin, shell, and components, depending on
how you want to do things, possibly installed from /etc/defaults/etc/profile.d/.

Or you could put a <domain>.sh driver script in /etc/profile.d/, and source
scripts from /usr/local/{bin,lib,share}/<domain>/.

You could use the Xwin directories ~/.local/ and ~/.config/ if you want user
specific customization, perhaps setup in /etc/defaults/etc/skel and installed by
a custom postinstall script base-files-<domain>.sh.

Or some combo of those and other standard approaches to local customization,
like .${OSTYPE}_profile, .${OSTYPE}rc, .${HOSTNAME}_profile, .${HOSTNAME}rc, etc.

Have a look at the various systems and shells and their initialization and
customization approaches, and adapt some existing infrastructure, rather than
stuffing something unique somewhere unexpected.

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

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