From 18fda58726ef28cd479e3990e08da749c512e456 Mon Sep 17 00:00:00 2001 From: mitchell Date: Mon, 28 Feb 2022 14:07:43 -0500 Subject: [PATCH] Add flag for reflector in pkm --- .config/fish/functions/pkm.fish | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.config/fish/functions/pkm.fish b/.config/fish/functions/pkm.fish index 3afa315..6a548ac 100644 --- a/.config/fish/functions/pkm.fish +++ b/.config/fish/functions/pkm.fish @@ -32,8 +32,15 @@ function _pacman_commander -a pkm command case i install $pkm --sync $args case f fetch - reflector --latest 50 --fastest 3 --sort age --protocol https --thread 4 | - sudo tee /etc/pacman.d/mirrorlist + argparse r/reflector -- $args + + sudo true + + if set -q _flag_reflector + reflector --latest 50 --fastest 3 --sort age --protocol https --thread 4 | + sudo tee /etc/pacman.d/mirrorlist + end + and $pkm --sync --refresh case u update $pkm --sync --sysupgrade $args