list.sh: fix arg parsing always failing
This commit is contained in:
parent
2971755498
commit
a101dfc466
@ -13,8 +13,14 @@ homebrew-list() {
|
|||||||
local formula=""
|
local formula=""
|
||||||
local cask=""
|
local cask=""
|
||||||
|
|
||||||
|
local first_arg
|
||||||
for arg in "$@"
|
for arg in "$@"
|
||||||
do
|
do
|
||||||
|
if [[ -z "${first_arg}" ]]
|
||||||
|
then
|
||||||
|
first_arg=1
|
||||||
|
[[ "${arg}" == "list" ]] && continue
|
||||||
|
fi
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
# check for flags passed to ls
|
# check for flags passed to ls
|
||||||
-1 | -l | -r | -t) ls_args+=("${arg}") ;;
|
-1 | -l | -r | -t) ls_args+=("${arg}") ;;
|
||||||
@ -29,6 +35,7 @@ homebrew-list() {
|
|||||||
if [[ -t 1 ]]
|
if [[ -t 1 ]]
|
||||||
then
|
then
|
||||||
tty=1
|
tty=1
|
||||||
|
source "${HOMEBREW_LIBRARY}/Homebrew/utils/helpers.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local error_string="LS_ERRORED"
|
local error_string="LS_ERRORED"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user