projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1afb651
)
better error handling in whatnow2
author
Philipp Takacs
<philipp@bureaucracy.de>
Fri, 12 Aug 2016 16:11:11 +0000
(18:11 +0200)
committer
Philipp Takacs
<philipp@bureaucracy.de>
Fri, 12 Aug 2016 16:11:11 +0000
(18:11 +0200)
if the command is unknown then usage is printed and if usage is
called with an argument other then 0 exit 1 is forced.
uip/whatnow2.sh
patch
|
blob
|
history
diff --git
a/uip/whatnow2.sh
b/uip/whatnow2.sh
index
dbddb55
..
4f957e2
100755
(executable)
--- a/
uip/whatnow2.sh
+++ b/
uip/whatnow2.sh
@@
-38,7
+38,7
@@
usage()
exit 0
fi
printhelp 1>&2
- exit $1
+ exit 1
}
get_editor()
@@
-293,4
+293,7
@@
w|wh|who|whom)
-V|-Ve|-Ver|-Vers|-Versi|-Versio|-Version)
version $#
;;
+*)
+ usage 1
+ ;;
esac