From c67aee3ca262299c60246e38069451502f8c5f43 Mon Sep 17 00:00:00 2001 From: short <> Date: Tue, 23 Mar 2004 18:22:43 +0000 Subject: [PATCH] Fixed fatal error during 'getopts' invocation in .bashrc functions. --- .bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 95a48dc..7cc89f9 100644 --- a/.bashrc +++ b/.bashrc @@ -22,7 +22,7 @@ function _bash_profile_addpath # , 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] -- 1.8.3.1