Fixed fatal error during 'getopts' invocation in .bashrc functions.
authorshort <>
Tue, 23 Mar 2004 18:22:43 +0000 (18:22 +0000)
committershort <>
Tue, 23 Mar 2004 18:22:43 +0000 (18:22 +0000)
.bashrc

diff --git a/.bashrc b/.bashrc
index 95a48dc..7cc89f9 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -22,7 +22,7 @@ function _bash_profile_addpath        # <variablename>,<dirpathname>
        OPTIND=1;while getopts fs got;do
                case "$got" in
                        [fs]) eval "_opt_$got=1" ;;
-                       *) exit 1 ;;
+                       *) return 1 ;;
                        esac
                done
        eval "_varname=\"\$$[$OPTIND+0]\""
@@ -194,7 +194,7 @@ function revlines { perl -e 'my @r=();push @r,$_ while (<>);print pop @r while @
                case "$got" in
                        [qalf]) eval "_opt_$got=1" ;;
                        v) ;;
-                       *) exit 1 ;;
+                       *) return 1 ;;
                        esac
                done
        shift $[$OPTIND-1]