Mail Archives: cygwin/2010/12/04/10:12:49
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
|
X-Spam-Check-By: | sourceware.org
|
Date: | Sat, 4 Dec 2010 16:12:29 +0100
|
From: | David Sastre <d DOT sastre DOT medina AT gmail DOT com>
|
To: | cygwin AT cygwin DOT com
|
Subject: | Re: Problem with Bash regex test case sensitivity
|
Message-ID: | <20101204151229.GB6106@jethro.local.lan>
|
References: | <4CF96F70 DOT 3090507 AT veritech DOT com> <AANLkTikQJEJ6kHKZdzzA_YB_DHgZBevCLDKtAEm6ZgBg AT mail DOT gmail DOT com> <4CF9BA08 DOT 8060703 AT redhat DOT com> <AANLkTi=pSXnqvF5OsQbaP8nE6sGHsL6crOG3z9D6SzWs AT mail DOT gmail DOT com>
|
MIME-Version: | 1.0
|
In-Reply-To: | <AANLkTi=pSXnqvF5OsQbaP8nE6sGHsL6crOG3z9D6SzWs@mail.gmail.com>
|
User-Agent: | Mutt/1.5.20 (2009-06-14)
|
X-IsSubscribed: | yes
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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
|
--TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Dec 04, 2010 at 10:05:42AM -0400, Lee wrote:
> > On 12/03/2010 07:11 PM, Lee wrote:
>=20
> why put the local
> defaults in ~/.bashrc? My understanding is that ~/.bashrc is called
> at every shell startup. Seems like that's one of those things that
> just needs to be set in the login shell, so wouldn't ~/.bash_profile
> be more appropriate for the locale settings?
(Most probably you already know all of this, but...)
As of now, the default settings are provided via /etc/profile:
if [ -d "/etc/profile.d" ]; then
while read f; do
if [ -f "${f}" ]; then
. "${f}"
fi
done <<- EOF
`/bin/find -L /etc/profile.d -type f -iname '*.sh' -or -iname '*.zsh' | L=
C_ALL=3DC sort`
EOF
fi
which in turn sources /etc/profile.d/lang.sh:
# if no locale variable is set, indicate terminal charset via LANG
test -z "${LC_ALL:-${LC_CTYPE:-$LANG}}" && export LANG=3DC.UTF-8
The bash manual page explains the order in which startup files are
read for both login and non-login shells (both interactive and
non-interactive). So, given that ~/.bash_profile sources ~/.bashrc, (in
our cygwin defaults), that looks like an easy way to set your LANG in a=20
per-user manner, no matter what kind of shell you open.
If you want it to be a system-wide setting, you should use
/etc/bash.bashrc (for the bash shell, of course).
Setting it only in ~/.bash_profile makes it invisible for non-login
shells.
--=20
Huella de clave primaria: 0FDA C36F F110 54F4 D42B D0EB 617D 396C 448B 31EB
--TakKZr9L6Hm6aLOc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkz6Wl0ACgkQYX05bESLMetu8wCfSeVKXkmXZdEbzeR0BvzpABZp
H98AoILeiQWFGjPk9Vxy/h7UMxJYQ687
=7vKL
-----END PGP SIGNATURE-----
--TakKZr9L6Hm6aLOc--
- Raw text -