git://git.jankratochvil.net
/
nethome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4deb63b
)
Fixed fatal error during 'getopts' invocation in .bashrc functions.
author
short
<>
Tue, 23 Mar 2004 18:22:43 +0000
(18:22 +0000)
committer
short
<>
Tue, 23 Mar 2004 18:22:43 +0000
(18:22 +0000)
.bashrc
patch
|
blob
|
history
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" ;;
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]\""
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) ;;
case "$got" in
[qalf]) eval "_opt_$got=1" ;;
v) ;;
- *)
exit
1 ;;
+ *)
return
1 ;;
esac
done
shift $[$OPTIND-1]
esac
done
shift $[$OPTIND-1]