bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: typeset -p & manpage on it are confusing w/rt funcs


From: Chet Ramey
Subject: Re: typeset -p & manpage on it are confusing w/rt funcs
Date: Mon, 08 Jul 2013 17:05:36 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

On 6/6/13 6:48 PM, Linda Walsh wrote:
> 
> I wanted to test to see if a function was defined and looking at
> typeset in the bash man page, I see
> typeset ...   The -p option  will
>               display the attributes and values of each name.  When -p is used
>               with name arguments, additional options are ignored.  When -p is
>               supplied  without name arguments, it will display the attributes
>               and values of all variables having the attributes  specified  by
>               the  additional  options.  If no other options are supplied with
>               -p, declare will display the attributes and values of all  shell
>               variables.   The  -f  option  will restrict the display to shell
>               functions.  The -F option inhibits the display of function defi-
>               nitions;
>        
> 
> ok ... so reading the above, how does "-f" and -F" tie in with
> "-p" ??  If I use -f with -p does that limit it to functions only?

I think the original intent of the -p option was to have it interact with
-f and -F to limit each name argument to the function namespace, and to
display definitions and attributes.  I will change the code and revise
the documentation to reflect that.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]