public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Can I read the name of a shell function?
@ 2003-11-07 16:52 Harig, Mark
  0 siblings, 0 replies; 5+ messages in thread
From: Harig, Mark @ 2003-11-07 16:52 UTC (permalink / raw)
  To: zzapper, cygwin

Please provide an example of what you are
doing, along with what results you are 
getting, and what results you expect.

> -----Original Message-----
> From: zzapper [mailto:david@tvis.co.uk]
> Sent: Friday, November 07, 2003 7:18 AM
> To: cygwin@cygwin.com
> Subject: Can I read the name of a shell function?
> 
> 
> HiYaAll
> 
> I have created a lot of functions in my .profile
> 
> When I try to read the function name from within the function $0 just
> returns bash. Is there any way of reading the functions name??
> 
> 
> zzapper
> --
> 
> vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"
> 
> http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I read the name of a shell function?
  2003-11-07 12:20 zzapper
  2003-11-07 17:27 ` Igor Pechtchanski
@ 2003-11-07 20:58 ` zzapper
  1 sibling, 0 replies; 5+ messages in thread
From: zzapper @ 2003-11-07 20:58 UTC (permalink / raw)
  To: cygwin

Thanx Everybody,

function bx()
{
echo $FUNCNAME
}

What I love, about UseNet is that Igor also shows me how 2 use info's
search (which I am also learning)

info bash --index-search="functions, shell" 
/param


zzapper
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I read the name of a shell function?
  2003-11-07 12:20 zzapper
@ 2003-11-07 17:27 ` Igor Pechtchanski
  2003-11-07 20:58 ` zzapper
  1 sibling, 0 replies; 5+ messages in thread
From: Igor Pechtchanski @ 2003-11-07 17:27 UTC (permalink / raw)
  To: zzapper; +Cc: cygwin

On Fri, 7 Nov 2003, zzapper wrote:

> HiYaAll
>
> I have created a lot of functions in my .profile
>
> When I try to read the function name from within the function $0 just
> returns bash. Is there any way of reading the functions name??
>
> zzapper

info bash --index-search="functions, shell"
/param

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Can I read the name of a shell function?
@ 2003-11-07 17:15 Morche Matthias
  0 siblings, 0 replies; 5+ messages in thread
From: Morche Matthias @ 2003-11-07 17:15 UTC (permalink / raw)
  To: zzapper, cygwin

Did You try $FUNCNAME? See also "man bash" :-)

as in "fn () { echo $FUNCNAME ; }"


> -----Original Message-----
> From: zzapper [mailto:david@tvis.co.uk]
> Sent: Friday, November 07, 2003 1:18 PM
> To: cygwin@cygwin.com
> Subject: Can I read the name of a shell function?
> 
> 
> HiYaAll
> 
> I have created a lot of functions in my .profile
> 
> When I try to read the function name from within the function $0 just
> returns bash. Is there any way of reading the functions name??
> 
> 
> zzapper
> --
> 
> vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"
> 
> http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Can I read the name of a shell function?
@ 2003-11-07 12:20 zzapper
  2003-11-07 17:27 ` Igor Pechtchanski
  2003-11-07 20:58 ` zzapper
  0 siblings, 2 replies; 5+ messages in thread
From: zzapper @ 2003-11-07 12:20 UTC (permalink / raw)
  To: cygwin

HiYaAll

I have created a lot of functions in my .profile

When I try to read the function name from within the function $0 just
returns bash. Is there any way of reading the functions name??


zzapper
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-07 20:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-07 16:52 Can I read the name of a shell function? Harig, Mark
  -- strict thread matches above, loose matches on Subject: below --
2003-11-07 17:15 Morche Matthias
2003-11-07 12:20 zzapper
2003-11-07 17:27 ` Igor Pechtchanski
2003-11-07 20:58 ` zzapper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).