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 cask=""
|
||||
|
||||
local first_arg
|
||||
for arg in "$@"
|
||||
do
|
||||
if [[ -z "${first_arg}" ]]
|
||||
then
|
||||
first_arg=1
|
||||
[[ "${arg}" == "list" ]] && continue
|
||||
fi
|
||||
case "${arg}" in
|
||||
# check for flags passed to ls
|
||||
-1 | -l | -r | -t) ls_args+=("${arg}") ;;
|
||||
@ -29,6 +35,7 @@ homebrew-list() {
|
||||
if [[ -t 1 ]]
|
||||
then
|
||||
tty=1
|
||||
source "${HOMEBREW_LIBRARY}/Homebrew/utils/helpers.sh"
|
||||
fi
|
||||
|
||||
local error_string="LS_ERRORED"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user