lunch: error on >1 arg (before ignored)

Bug: N/A
Test: lunch w/ 0, 1, and 2 args
Change-Id: Icbeb511e836b08cbd64b08a23b0e4820039b12ab
This commit is contained in:
Steven Moreland 2020-02-25 18:30:18 -08:00
parent 5832bf1f5a
commit 92793dc56c

View file

@ -599,7 +599,12 @@ function lunch()
{
local answer
if [ "$1" ] ; then
if [[ $# -gt 1 ]]; then
echo "usage: lunch [target]" >&2
return 1
fi
if [ "$1" ]; then
answer=$1
else
print_lunch_menu