function invoking alias fails if defined in same conditional

2012-03-16 Thread gregrwm
a function invoking an alias works, unless they are defined within the same conditional, eg: $ if true;then >alias aseparate='echo aseparate' > fi $ if true;then > fseparate()(aseparate) > fi $ if true;then >alias atogether='echo atogether' > ftogether()(atogethe

Re: Saving command history for non-interactive shell

2012-03-16 Thread Chet Ramey
On 3/16/12 12:39 PM, Lars Peterson wrote: > Thanks Greg. > > I get what you're saying about the futility of recording everything users do. > And I'm not interested in setting up a big brother / spy machine that will > invoke the wrath of the Unix gods. > > I'm not interested in security here...

RE: Saving command history for non-interactive shell

2012-03-16 Thread Lars Peterson
Thanks Greg. I get what you're saying about the futility of recording everything users do. And I'm not interested in setting up a big brother / spy machine that will invoke the wrath of the Unix gods. I'm not interested in security here...just auditing. We have a lot of scripts and commands th

Re: Saving command history for non-interactive shell

2012-03-16 Thread Greg Wooledge
On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: > Is there a way to configure bash so that commands from a non-interactive > shell are preserved in the history? I'm more interested in saving commands > invoked via ssh vs shell scrpts. >From CHANGES, for bash 4.1: l. There is a new

Saving command history for non-interactive shell

2012-03-16 Thread Lars Peterson
Hello, Is there a way to configure bash so that commands from a non-interactive shell are preserved in the history? I'm more interested in saving commands invoked via ssh vs shell scrpts. I did not succeed when trying a few things to "force" interactive mode such as: # invoke bash as a login s

Re: bug: bash 4.2.20 impossibly slow

2012-03-16 Thread Chet Ramey
On 3/14/12 2:14 PM, Somchai Smythe wrote: > Hello, > > I am reporting a problem with performance, not correctness. > > While preparing some examples for a course lecture where I code the > same algorithm in many languages to compare languages, I ran some code > and while it was reasonably quick

Re: bash tab variable expansion question?

2012-03-16 Thread Chet Ramey
> Please let me know how the relpath patch works for you. Here's a better version of the relpath patch, which should apply more cleanly to the bash-4.2.24 source tree. Chet *** ../bash-4.2-direxpand/bashline.c2012-03-13 16:34:46.0 -0400 --- bashline.c 2012-03-13 16:36:41.0 -