Thread View: gnu.bash.bug
2 messages
2 total messages
Started by RoBeRt KaRp
Thu, 28 Sep 1989 05:52
exiting from functions
Author: RoBeRt KaRp
Date: Thu, 28 Sep 1989 05:52
Date: Thu, 28 Sep 1989 05:52
32 lines
1284 bytes
1284 bytes
OK, so it's not a bug, but I see a handy feature to be
added later here.
If I have a function:
foo()
{
if [ -d $whatever ]
then
cd $whatever
else
exit
}
This will exit from the shell, not the function only. How can
I exit from just the function.
Also, using bash-1.03 with the vi diffs that came accross
the other week, on an xterm, I have problems with the
command line editing.
1) it doesn't know where the beginning of the
line is.
2) I have CTRL chars embedded in my PS1 to reverse
video it on the xterm, & this confuses bash.
- Robi
--
Robert Karp :- robi@attila.esa.oz.AU -: // /////
{uunet,mcvax,ukc,nttlab}!munnari!attila.esa.oz!robi // /////
Snail: 15-17 Paraween Street,Cremorne, NSW 2090 \\ XX\XXX//
Tel : (+61) (02) 953 9488 \X/\XXXX/
exiting from functions
Author: Brian Fox
Date: Thu, 28 Sep 1989 15:47
Date: Thu, 28 Sep 1989 15:47
22 lines
933 bytes
933 bytes
From: munnari!attila.esa.oz.au!robi@uunet.uu.net (RoBeRt KaRp)
Date: Thu, 28 Sep 89 15:52:46 W
OK, so it's not a bug, but I see a handy feature to be
added later here.
If I have a function:
foo()
{
if [ -d $whatever ]
then
cd $whatever
else
exit
}
This will exit from the shell, not the function only. How can
I exit from just the function.
Use "return".
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads