Bug#310598: bash:[completion] renders set unusable (forwarded from Eddy Petrisor) (forwarded from Ian Macdonald)

2006-02-25 Thread Ian Macdonald
On Fri 09 Sep 2005 at 20:42:53 -0400, you wrote:

 
  It would be nice if there were an option to set to display the
  environment minus any defined shell functions. Perhaps this could be
  suggested to the bash maintainer, Chet Ramey.
 
 When bash is in posix mode, `set' displays variables only, without
 shell functions.  You can easily write a shell function to toggle
 the value of posix mode around a call to `set'.

That's good to know.

It's probably just enough to run this in a subshell. I imagine something
like this:

set_no_funcs() { ( set -o posix; set ) }

That way, there's no need to store the current state of the 'posix'
option and restore it afterwards.

Ian
-- 
Ian Macdonald   | In spite of everything, I still believe
[EMAIL PROTECTED] | that people are good at heart.   -- Ann
http://www.caliban.org/ | Frank 
| 
| 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#310598: bash:[completion] renders set unusable (forwarded from Eddy Petrisor) (forwarded from Ian Macdonald)

2005-09-09 Thread Chet Ramey

 It would be nice if there were an option to set to display the
 environment minus any defined shell functions. Perhaps this could be
 suggested to the bash maintainer, Chet Ramey.

When bash is in posix mode, `set' displays variables only, without
shell functions.  You can easily write a shell function to toggle
the value of posix mode around a call to `set'.

If it's only the environment you're interested in, use `export -p'
instead of `set'.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live Strong.
Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]