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/
RE: Can I read the name of a shell function?
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:[EMAIL PROTECTED] Sent: Friday, November 07, 2003 7:18 AM To: [EMAIL PROTECTED] 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/
RE: Can I read the name of a shell function?
Did You try $FUNCNAME? See also man bash :-) as in fn () { echo $FUNCNAME ; } -Original Message- From: zzapper [mailto:[EMAIL PROTECTED] Sent: Friday, November 07, 2003 1:18 PM To: [EMAIL PROTECTED] 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/
Re: Can I read the name of a shell function?
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/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,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/
Re: Can I read the name of a shell function?
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/