Re: Exported (ba)sh functions in the environment

2012-05-28 Thread Paul Wise
On Tue, May 29, 2012 at 9:18 AM, Miles Baderwrote: > What would seem interesting would be a way to autoload bash completion > support for each command ... as it would seem not uncommon to have shell > sessions where the user never tries to use completion for 99% of the > commands handled. > > [or

Re: Exported (ba)sh functions in the environment

2012-05-28 Thread Miles Bader
Peter Samuelson writes: > If you can think of a way to implement this same stuff (and remember, > bash-completion supports a _lot_ more complex cases than 'kill') > without adding 200 kB of shell functions to bash's runtime, by all > means, do it and see how it works out. What would seem interest

Re: Exported (ba)sh functions in the environment

2012-05-28 Thread Peter Samuelson
[Philip Ashmore] > I guess I'm confused as to why bash completion needs these. Easy enough to read /etc/bash_completion and /etc/bash_completion.d/* and see for yourself why it needs these. bash-completion is full of special cases to "do the right thing" in hundreds or thousands of different cir

Re: Exported (ba)sh functions in the environment

2012-05-28 Thread Philip Ashmore
On 28/05/12 19:17, Peter Samuelson wrote: [Philip Ashmore] On my machine running "set> set.txt&& ls -lsa set.txt" reveals that my environment contains 225517 of "stuff" - some of it is even being taken up by exported function definitions! As mentioned earlier, 'set' is not reporting much mo

Re: Exported (ba)sh functions in the environment

2012-05-28 Thread Peter Samuelson
[Philip Ashmore] > On my machine running "set > set.txt && ls -lsa set.txt" reveals that my > environment contains 225517 of "stuff" - some of it is even being > taken up by > exported function definitions! As mentioned earlier, 'set' is not reporting much more than the environment exported to ex

Re: Exported (ba)sh functions in the environment

2012-05-25 Thread Philip Ashmore
On 26/05/12 04:34, Russ Allbery wrote: > Philip Ashmore writes: > >> Here's where I wish I was a shell script guru: >>for var in `cat set.txt`; do >> { if in env discard } >>done >>{ sort offenders by decending size } >> Here's a summary of the ones that caught my eye. Sorry if

Re: Exported (ba)sh functions in the environment

2012-05-25 Thread Russ Allbery
Philip Ashmore writes: > Here's where I wish I was a shell script guru: >for var in `cat set.txt`; do > { if in env discard } >done >{ sort offenders by decending size } > Here's a summary of the ones that caught my eye. Sorry if I missed > anyone out! Oh. This is smelling l

Re: Exported (ba)sh functions in the environment

2012-05-25 Thread Osamu Aoki
Hi, On Fri, May 25, 2012 at 08:14:28PM -0700, Russ Allbery wrote: > Philip Ashmore writes: > I'm curious why even your set of shell variables is so large, though. My > environment is only 1699 bytes on a system I logged onto via ssh, and 1998 > on my desktop (running Xfce). One of the biggest c

Re: Exported (ba)sh functions in the environment

2012-05-25 Thread Philip Ashmore
On 26/05/12 04:14, Russ Allbery wrote: > I'm curious why even your set of shell variables is so large, though. My > environment is only 1699 bytes on a system I logged onto via ssh, and 1998 > on my desktop (running Xfce). One of the biggest chunks of that is > LS_COLORS. > Here's where I wish

Re: Exported (ba)sh functions in the environment

2012-05-25 Thread Russ Allbery
Philip Ashmore writes: > According to "man sh" (which links to the dash man page) > set [{ -options | +options | -- }] arg ... > The set command performs three different functions. > With no arguments, it lists the values of all shell variables. > So are these copi

Re: Exported (ba)sh functions in the environment

2012-05-25 Thread Philip Ashmore
On 26/05/12 03:59, Philip Ashmore wrote: > On 26/05/12 03:50, Philip Ashmore wrote: >> >> That's 225517 bytes that needs to be copied every time a script runs. > > Yeah that should read "every time a script or program runs." > > Philip > Sorry Ben, our emails collided. According to "man sh" (whic

Re: Exported (ba)sh functions in the environment

2012-05-25 Thread Philip Ashmore
On 26/05/12 03:50, Philip Ashmore wrote: That's 225517 bytes that needs to be copied every time a script runs. Yeah that should read "every time a script or program runs." Philip -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Cont

Re: Exported (ba)sh functions in the environment

2012-05-25 Thread Ben Hutchings
On Sat, May 26, 2012 at 03:50:02AM +0100, Philip Ashmore wrote: [...] > On my machine running "set > set.txt && ls -lsa set.txt" reveals that my > environment contains 225517 of "stuff" - some of it is even being > taken up by > exported function definitions! > > That's 225517 bytes that needs to

Exported (ba)sh functions in the environment

2012-05-25 Thread Philip Ashmore
Hi there. I recently had cause to search for an environment variable to see if it was being set. As a result I noticed that the environment has become a bit of a dumping ground for installed programs where configuration files would have been a cleaner option. Looking for an override in the e