Skip to content

Commit

Permalink
Change quiet mode to include --no-refresh
Browse files Browse the repository at this point in the history
Saves quite a bit of time during search, info, etc
  • Loading branch information
simoniz0r committed Jul 10, 2018
1 parent fbcdc55 commit c49d0ec
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions zyp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ function zypstart() {
;;
# replace info from 'zypper' with 'rpm -q --info' for much faster results
if|info)
if [ "$ZYPPER" = "zypper -q" ]; then
zypper "$@" | grep -vw "^.*Loading repository data\.\.\..*" | grep -vw "^.*Reading installed packages\.\.\..*" \
if [ "$ZYPPER" = "zypper --no-refresh -q" ]; then
zypper --no-refresh "$@" | grep -vw "^.*Loading repository data\.\.\..*" | grep -vw "^.*Reading installed packages\.\.\..*" \
|grep -vw "^.*Repository .* is out-of-date.*"
else
$ZYPPER "$@"
Expand Down Expand Up @@ -391,14 +391,9 @@ fi
case "$1" in
-q|--quiet)
shift
ZYPPER="zypper -q"
ZYPPER="zypper --no-refresh -q"
USE_RPM="FALSE"
;;
-F|--fast)
shift
ZYPPER="zypper"
USE_RPM="TRUE"
;;
*)
ZYPPER="zypper"
USE_RPM="FALSE"
Expand Down

0 comments on commit c49d0ec

Please sign in to comment.