From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112918 invoked by alias); 8 Apr 2019 07:05:49 -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 112909 invoked by uid 89); 8 Apr 2019 07:05:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TBC autolearn=no version=3.3.1 spammy=customization, H*R:D*ca, company, driver X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.139) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Apr 2019 07:05:47 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id DOLghznMxo7SQDOLhhUOdL; Mon, 08 Apr 2019 01:05:45 -0600 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: base-files revisited To: cygwin@cygwin.com References: From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <147454c3-692f-a541-4019-a557773faff7@SystematicSw.ab.ca> Date: Mon, 08 Apr 2019 07:05:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00067.txt.bz2 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 .sh driver script in /etc/profile.d/, and source scripts from /usr/local/{bin,lib,share}//. 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-.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