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:
parent
5832bf1f5a
commit
92793dc56c
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue